From fb9030d7ddf1fe8c9657af3f8361d38a1742a803 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 7 Aug 2023 19:05:59 +0000 Subject: Structurally normalize weak and inherent too --- compiler/rustc_hir_analysis/src/autoderef.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_hir_analysis/src') diff --git a/compiler/rustc_hir_analysis/src/autoderef.rs b/compiler/rustc_hir_analysis/src/autoderef.rs index c07ac35cba3..39db295044e 100644 --- a/compiler/rustc_hir_analysis/src/autoderef.rs +++ b/compiler/rustc_hir_analysis/src/autoderef.rs @@ -74,7 +74,7 @@ impl<'a, 'tcx> Iterator for Autoderef<'a, 'tcx> { // we have some type like `&::Assoc`, since users of // autoderef expect this type to have been structurally normalized. if self.infcx.next_trait_solver() - && let ty::Alias(ty::Projection, _) = ty.kind() + && let ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _) = ty.kind() { let (normalized_ty, obligations) = self.structurally_normalize(ty)?; self.state.obligations.extend(obligations); -- cgit 1.4.1-3-g733a5