about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/autoderef.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-08-07 19:05:59 +0000
committerMichael Goulet <michael@errs.io>2023-08-07 19:05:59 +0000
commitfb9030d7ddf1fe8c9657af3f8361d38a1742a803 (patch)
tree5b2e9fe0f7f535e637411bd6cc03feaf961383de /compiler/rustc_hir_analysis/src/autoderef.rs
parent2aae331706fee2a901766a0f0c008b263b077242 (diff)
downloadrust-fb9030d7ddf1fe8c9657af3f8361d38a1742a803.tar.gz
rust-fb9030d7ddf1fe8c9657af3f8361d38a1742a803.zip
Structurally normalize weak and inherent too
Diffstat (limited to 'compiler/rustc_hir_analysis/src/autoderef.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/autoderef.rs2
1 files changed, 1 insertions, 1 deletions
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 `&<Ty as Trait>::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);