Skip to content

Commit 182698f

Browse files
committed
Don't error on subtyping of equal types
1 parent 6c6b302 commit 182698f

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+1
-1
lines changed

compiler/rustc_infer/src/infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ impl<'tcx> InferCtxt<'tcx> {
952952
// a test for it.
953953
(_, ty::Infer(ty::TyVar(_))) => {}
954954
(ty::Infer(ty::TyVar(_)), _) => {}
955-
_ if (r_a, r_b).has_opaque_types() => {
955+
_ if r_a != r_b && (r_a, r_b).has_opaque_types() => {
956956
span_bug!(
957957
cause.span(),
958958
"opaque types got hidden types registered from within subtype predicate: {r_a:?} vs {r_b:?}"

0 commit comments

Comments
 (0)