have better explanation for relate_types
This commit is contained in:
parent
6f0c5ee2d4
commit
5d753abb30
13 changed files with 40 additions and 34 deletions
|
@ -30,9 +30,9 @@ pub fn is_equal_up_to_subtyping<'tcx>(
|
|||
|
||||
/// Returns whether `src` is a subtype of `dest`, i.e. `src <: dest`.
|
||||
///
|
||||
/// For almost all of the use cases variance should be `Covariant`,
|
||||
/// in `MirPhase` >= `MirPhase::Runtime(RuntimePhase::Initial` variance should
|
||||
/// be `Invariant`.
|
||||
/// When validating assignments, the variance should be `Covariant`. When checking
|
||||
/// during `MirPhase` >= `MirPhase::Runtime(RuntimePhase::Initial)` variance should be `Invariant`
|
||||
/// because we want to check for type equality.
|
||||
///
|
||||
/// This mostly ignores opaque types as it can be used in constraining contexts
|
||||
/// while still computing the final underlying type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue