Skip to content

Commit b01097f

Browse files
committed
improve comments
1 parent efa4269 commit b01097f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

compiler/rustc_type_ir/src/predicate_kind.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,20 @@ pub enum PredicateKind<I: Interner> {
148148
/// Used for coherence to mark opaque types as possibly equal to each other but ambiguous.
149149
Ambiguous,
150150

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

160161
/// Separate from `ClauseKind::Projection` which is used for normalization in new solver.
161162
/// This predicate requires two terms to be equal to eachother.
162163
///
163-
/// Only used for new solver
164+
/// Only used for new solver.
164165
AliasRelate(I::Term, I::Term, AliasRelationDirection),
165166
}
166167

0 commit comments

Comments
 (0)