Skip to content

Commit 45983fe

Browse files
committed
Add comments about outlives_env
1 parent ff11dfd commit 45983fe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_trait_selection/src/traits/coherence.rs

+7
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,13 @@ fn negative_impl_exists<'cx, 'tcx>(
392392
}
393393

394394
let mut outlives_env = OutlivesEnvironment::new(param_env);
395+
// FIXME -- add "assumed to be well formed" types into the `outlives_env`
396+
397+
// "Save" the accumulated implied bounds into the outlives environment
398+
// (due to the FIXME above, there aren't any, but this step is still needed).
399+
// The "body id" is given as `CRATE_HIR_ID`, which is the same body-id used
400+
// by the "dummy" causes elsewhere (body-id is only relevant when checking
401+
// function bodies with closures).
395402
outlives_env.save_implied_bounds(CRATE_HIR_ID);
396403

397404
infcx.process_registered_region_obligations(

0 commit comments

Comments
 (0)