Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Mar 18, 2024
1 parent efa4269 commit b01097f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions compiler/rustc_type_ir/src/predicate_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,20 @@ pub enum PredicateKind<I: Interner> {
/// Used for coherence to mark opaque types as possibly equal to each other but ambiguous.
Ambiguous,

/// The alias normalizes to `term`. Unlike `Projection`, this always fails if the alias
/// cannot be normalized in the current context.
/// This should only used inside of the mew solver for `AliasRelate` and expects
/// the `term` to be an unconstrained inference variable.
///
/// `Projection(<T as Trait>::Assoc, ?x)` results in `?x == <T as Trait>::Assoc` while
/// `NormalizesTo(<T as Trait>::Assoc, ?x)` results in `NoSolution`.
///
/// Only used in the new solver.
/// The alias normalizes to `term`. Unlike `Projection`, this always ails if the
/// alias cannot be normalized in the current context. For the rigid alias
/// `T as Trait>::Assoc`, `Projection(<T as Trait>::Assoc, ?x)` constrains `?x`
/// to `<T as Trait>::Assoc` while `NormalizesTo(<T as Trait>::Assoc, ?x)`
/// results in `NoSolution`.
NormalizesTo(I::NormalizesTo),

/// Separate from `ClauseKind::Projection` which is used for normalization in new solver.
/// This predicate requires two terms to be equal to eachother.
///
/// Only used for new solver
/// Only used for new solver.
AliasRelate(I::Term, I::Term, AliasRelationDirection),
}

Expand Down

0 comments on commit b01097f

Please sign in to comment.