Don't error on subtyping of equal types

This commit is contained in:
Oli Scherer 2024-04-17 10:09:38 +00:00
parent 6c6b3027ef
commit 182698fef2

View File

@ -952,7 +952,7 @@ impl<'tcx> InferCtxt<'tcx> {
// a test for it. // a test for it.
(_, ty::Infer(ty::TyVar(_))) => {} (_, ty::Infer(ty::TyVar(_))) => {}
(ty::Infer(ty::TyVar(_)), _) => {} (ty::Infer(ty::TyVar(_)), _) => {}
_ if (r_a, r_b).has_opaque_types() => { _ if r_a != r_b && (r_a, r_b).has_opaque_types() => {
span_bug!( span_bug!(
cause.span(), cause.span(),
"opaque types got hidden types registered from within subtype predicate: {r_a:?} vs {r_b:?}" "opaque types got hidden types registered from within subtype predicate: {r_a:?} vs {r_b:?}"