about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/mod.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-25 03:03:39 +0000
committerMichael Goulet <michael@errs.io>2025-01-28 18:55:03 +0000
commit2b8930c71c8040d338f99e1b1be6f1056edd6638 (patch)
tree28f8f86fad208abcfa6716b93393453684f7d79e /compiler/rustc_trait_selection/src/traits/mod.rs
parentfdd1a3b02687817cea41f6bacae3d5fbed2b2cd0 (diff)
downloadrust-2b8930c71c8040d338f99e1b1be6f1056edd6638.tar.gz
rust-2b8930c71c8040d338f99e1b1be6f1056edd6638.zip
Consolidate OutlivesEnv construction with resolve_regions
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/mod.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/mod.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs
index fe5ad003a7e..6b5ebade6ae 100644
--- a/compiler/rustc_trait_selection/src/traits/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/mod.rs
@@ -290,12 +290,10 @@ fn do_normalize_predicates<'tcx>(
 
     // We can use the `elaborated_env` here; the region code only
     // cares about declarations like `'a: 'b`.
-    let outlives_env = OutlivesEnvironment::new(elaborated_env);
-
     // FIXME: It's very weird that we ignore region obligations but apparently
     // still need to use `resolve_regions` as we need the resolved regions in
     // the normalized predicates.
-    let errors = infcx.resolve_regions(&outlives_env);
+    let errors = infcx.resolve_regions(cause.body_id, elaborated_env, []);
     if !errors.is_empty() {
         tcx.dcx().span_delayed_bug(
             span,