Skip to content

Commit

Permalink
Rollup merge of #124066 - oli-obk:define_opaque_types7, r=compiler-er…
Browse files Browse the repository at this point in the history
…rors

Don't error on subtyping of equal types

fixes #124054 🤦
fixes #124075
fixes #124079

r? `@compiler-errors`
  • Loading branch information
matthiaskrgr authored Apr 17, 2024
2 parents abac22f + 182698f commit 116c0f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ impl<'tcx> InferCtxt<'tcx> {
// a test for it.
(_, 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!(
cause.span(),
"opaque types got hidden types registered from within subtype predicate: {r_a:?} vs {r_b:?}"
Expand Down

0 comments on commit 116c0f7

Please sign in to comment.