Skip to content

Commit f5f6761

Browse files
committed
add comment about opaque types
1 parent 6aa611a commit f5f6761

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_const_eval/src/util/compare_types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ pub fn is_equal_up_to_subtyping<'tcx>(
2828
}
2929

3030
/// Returns whether `src` is a subtype of `dest`, i.e. `src <: dest`.
31+
///
32+
/// This mostly ignores opaque types as it can be used in constraining contexts
33+
/// while still computing the final underlying type.
3134
pub fn is_subtype<'tcx>(
3235
tcx: TyCtxt<'tcx>,
3336
param_env: ParamEnv<'tcx>,

0 commit comments

Comments
 (0)