diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-17 18:01:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-17 18:01:40 +0200 |
| commit | 116c0f7288ece419d00d18f9f5e1eee42fbb5863 (patch) | |
| tree | 57f85fdabb2332fd0b5a1e840c091555cc4ae53d | |
| parent | abac22f485bc03a34f470241a6baa282195118e9 (diff) | |
| parent | 182698fef275b187b4e0bf68d9ab38061ce55ff0 (diff) | |
| download | rust-116c0f7288ece419d00d18f9f5e1eee42fbb5863.tar.gz rust-116c0f7288ece419d00d18f9f5e1eee42fbb5863.zip | |
Rollup merge of #124066 - oli-obk:define_opaque_types7, r=compiler-errors
Don't error on subtyping of equal types fixes https://github.com/rust-lang/rust/issues/124054 🤦 fixes #124075 fixes https://github.com/rust-lang/rust/issues/124079 r? `@compiler-errors`
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 1dbf435e8c7..255e688fbc1 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -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:?}" |
