about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-11-18 10:50:14 +0100
committerlcnr <rust@lcnr.de>2024-11-18 10:50:14 +0100
commit2e087d2eaac31863c55f67bc22d15d77b96c6fc3 (patch)
treec90a39bb9986e1caeaa41915807406c0ae36befa /compiler/rustc_borrowck/src
parent9cba14b95bb07a5b31ed1aac2bf4eadd248232da (diff)
downloadrust-2e087d2eaac31863c55f67bc22d15d77b96c6fc3.tar.gz
rust-2e087d2eaac31863c55f67bc22d15d77b96c6fc3.zip
review
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 2afd52964dc..129a30661d6 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -707,7 +707,9 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
             // Test the callee's predicates, substituting in `ref_ty` for the moved argument type.
             clauses.instantiate(tcx, new_args).predicates.iter().all(|&(mut clause)| {
                 // Normalize before testing to see through type aliases and projections.
-                if let Ok(normalized) = tcx.try_normalize_erasing_regions(self.param_env, clause) {
+                if let Ok(normalized) =
+                    tcx.try_normalize_erasing_regions(self.infcx.typing_env(self.param_env), clause)
+                {
                     clause = normalized;
                 }
                 self.infcx.predicate_must_hold_modulo_regions(&Obligation::new(