about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-03 17:27:07 +0100
committerGitHub <noreply@github.com>2024-12-03 17:27:07 +0100
commit49df325cb42c409db13f689a5ff3cc5d7e6627f2 (patch)
treea3c3a8c8f44ca6110f499b3b6937f8bc3c39feac /compiler
parent453a1a8b7ff049e697bbd15aad2d4674b2825768 (diff)
parent0609b999681f9c807554bffe838288bda7efa3f1 (diff)
downloadrust-49df325cb42c409db13f689a5ff3cc5d7e6627f2.tar.gz
rust-49df325cb42c409db13f689a5ff3cc5d7e6627f2.zip
Rollup merge of #133558 - compiler-errors:structurally-resolve-probe-adt, r=lcnr
Structurally resolve in `probe_adt`

fixes #132320

r? lcnr
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
index 3940d138deb..aacdcf027b6 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
@@ -307,7 +307,11 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
             ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _)
                 if !ty.has_escaping_bound_vars() =>
             {
-                self.normalize(span, ty).ty_adt_def()
+                if self.next_trait_solver() {
+                    self.try_structurally_resolve_type(span, ty).ty_adt_def()
+                } else {
+                    self.normalize(span, ty).ty_adt_def()
+                }
             }
             _ => None,
         }