about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/util/compare_types.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/util/compare_types.rs b/compiler/rustc_const_eval/src/util/compare_types.rs
index dd4c67e8d6b..265ca0c7884 100644
--- a/compiler/rustc_const_eval/src/util/compare_types.rs
+++ b/compiler/rustc_const_eval/src/util/compare_types.rs
@@ -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.