]> git.lizzy.rs Git - rust.git/commitdiff
add comment about opaque types
authorlcnr <rust@lcnr.de>
Tue, 15 Nov 2022 12:43:57 +0000 (13:43 +0100)
committerlcnr <rust@lcnr.de>
Tue, 15 Nov 2022 12:50:13 +0000 (13:50 +0100)
compiler/rustc_const_eval/src/util/compare_types.rs

index a1fce8cbd0f09ce030ff593d55e284673a41c27b..8a317a78afbcdc8c0dfb6be2894d9c6931cca3ae 100644 (file)
@@ -28,6 +28,9 @@ pub fn is_equal_up_to_subtyping<'tcx>(
 }
 
 /// Returns whether `src` is a subtype of `dest`, i.e. `src <: dest`.
+///
+/// This mostly ignores opaque types as it can be used in constraining contexts
+/// while still computing the final underlying type.
 pub fn is_subtype<'tcx>(
     tcx: TyCtxt<'tcx>,
     param_env: ParamEnv<'tcx>,