Rename IncompleteAbility

This commit is contained in:
Ayaz Hafiz 2022-07-25 12:51:55 -04:00
parent c0d26226dd
commit 04ee74542d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 5 additions and 5 deletions

View file

@ -14,8 +14,8 @@ use crate::solve::{Aliases, Pools, TypeError};
#[derive(Debug, Clone)]
pub enum AbilityImplError {
/// Promote this to an error that the type does not fully implement an ability
IncompleteAbility,
/// Promote this to a generic error that a type doesn't implement an ability
DoesNotImplement,
/// Promote this error to a `TypeError::BadExpr` from elsewhere
BadExpr(Region, Category, Variable),
/// Promote this error to a `TypeError::BadPattern` from elsewhere
@ -219,7 +219,7 @@ impl DeferredObligations {
use AbilityImplError::*;
match on_error {
IncompleteAbility => {
DoesNotImplement => {
// These aren't attached to another type error, so if these must_implement
// constraints aren't met, we'll emit a generic "this type doesn't implement an
// ability" error message at the end. We only want to do this if it turns out

View file

@ -715,7 +715,7 @@ fn run_in_place(
exposed_by_module,
);
deferred_obligations.add(new_must_implement, AbilityImplError::IncompleteAbility);
deferred_obligations.add(new_must_implement, AbilityImplError::DoesNotImplement);
let (obligation_problems, _derived) = deferred_obligations.check_all(subs, abilities_store);
problems.extend(obligation_problems);
@ -1467,7 +1467,7 @@ fn solve(
introduce(subs, rank, pools, &vars);
deferred_obligations
.add(must_implement_ability, AbilityImplError::IncompleteAbility);
.add(must_implement_ability, AbilityImplError::DoesNotImplement);
deferred_uls_to_resolve.union(lambda_sets_to_specialize);
// Case 1: unify error types, but don't check exhaustiveness.