Rollup merge of #130927 - lcnr:normalizes-to-comments, r=compiler-errors
update outdated comments r? `@compiler-errors` cc `@gavinleroy`
This commit is contained in:
commit
966a0b76bc
2 changed files with 8 additions and 8 deletions
|
@ -668,8 +668,8 @@ impl<I: Interner> fmt::Debug for ProjectionPredicate<I> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used by the new solver. Unlike a `ProjectionPredicate` this can only be
|
/// Used by the new solver to normalize an alias. This always expects the `term` to
|
||||||
/// proven by actually normalizing `alias`.
|
/// be an unconstrained inference variable which is used as the output.
|
||||||
#[derive_where(Clone, Copy, Hash, PartialEq, Eq; I: Interner)]
|
#[derive_where(Clone, Copy, Hash, PartialEq, Eq; I: Interner)]
|
||||||
#[derive(TypeVisitable_Generic, TypeFoldable_Generic, Lift_Generic)]
|
#[derive(TypeVisitable_Generic, TypeFoldable_Generic, Lift_Generic)]
|
||||||
#[cfg_attr(feature = "nightly", derive(TyDecodable, TyEncodable, HashStable_NoContext))]
|
#[cfg_attr(feature = "nightly", derive(TyDecodable, TyEncodable, HashStable_NoContext))]
|
||||||
|
|
|
@ -74,13 +74,13 @@ pub enum PredicateKind<I: Interner> {
|
||||||
Ambiguous,
|
Ambiguous,
|
||||||
|
|
||||||
/// This should only be used inside of the new solver for `AliasRelate` and expects
|
/// This should only be used inside of the new solver for `AliasRelate` and expects
|
||||||
/// the `term` to be an unconstrained inference variable.
|
/// the `term` to be always be an unconstrained inference variable. It is used to
|
||||||
|
/// normalize `alias` as much as possible. In case the alias is rigid - i.e. it cannot
|
||||||
|
/// be normalized in the current environment - this constrains `term` to be equal to
|
||||||
|
/// the alias itself.
|
||||||
///
|
///
|
||||||
/// The alias normalizes to `term`. Unlike `Projection`, this always fails if the
|
/// It is likely more useful to think of this as a function `normalizes_to(alias)`,
|
||||||
/// alias cannot be normalized in the current context. For the rigid alias
|
/// whose return value is written into `term`.
|
||||||
/// `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(ty::NormalizesTo<I>),
|
NormalizesTo(ty::NormalizesTo<I>),
|
||||||
|
|
||||||
/// Separate from `ClauseKind::Projection` which is used for normalization in new solver.
|
/// Separate from `ClauseKind::Projection` which is used for normalization in new solver.
|
||||||
|
|
Loading…
Add table
Reference in a new issue