From f5f67618e25be01d8580e3d49033e0f39a3e7781 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 15 Nov 2022 13:43:57 +0100 Subject: [PATCH] add comment about opaque types --- compiler/rustc_const_eval/src/util/compare_types.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_const_eval/src/util/compare_types.rs b/compiler/rustc_const_eval/src/util/compare_types.rs index a1fce8cbd0f..8a317a78afb 100644 --- a/compiler/rustc_const_eval/src/util/compare_types.rs +++ b/compiler/rustc_const_eval/src/util/compare_types.rs @@ -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>,