Skip to content

Commit 9cefcea

Browse files
committed
Auto merge of #136038 - compiler-errors:outlives, r=lcnr
Simplify and consolidate the way we handle construct `OutlivesEnvironment` for lexical region resolution This is best reviewed commit-by-commit. I tried to consolidate the API for lexical region resolution *first*, then change the API when it was finally behind a single surface. r? lcnr or reassign
2 parents bc26e04 + cd9a8cc commit 9cefcea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/traits/implied-bounds.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ requirements of impls and functions as explicit predicates.
4040
### using implicit implied bounds as assumptions
4141

4242
These bounds are not added to the `ParamEnv` of the affected item itself. For lexical
43-
region resolution they are added using [`fn OutlivesEnvironment::with_bounds`].
43+
region resolution they are added using [`fn OutlivesEnvironment::new`].
4444
Similarly, during MIR borrowck we add them using
4545
[`fn UniversalRegionRelationsBuilder::add_implied_bounds`].
4646

@@ -55,7 +55,7 @@ The assumed outlives constraints for implicit bounds are computed using the
5555
MIR borrowck adds the outlives constraints for both the normalized and unnormalized types,
5656
lexical region resolution [only uses the unnormalized types][notnorm].
5757

58-
[`fn OutlivesEnvironment::with_bounds`]: https://github.com/rust-lang/rust/blob/5b8bc568d28b2e922290c9a966b3231d0ce9398b/compiler/rustc_infer/src/infer/outlives/env.rs#L90-L97
58+
[`fn OutlivesEnvironment::new`]: TODO
5959
[`fn UniversalRegionRelationsBuilder::add_implied_bounds`]: https://github.com/rust-lang/rust/blob/5b8bc568d28b2e922290c9a966b3231d0ce9398b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs#L316
6060
[mir]: https://github.com/rust-lang/rust/blob/91cae1dcdcf1a31bd8a92e4a63793d65cfe289bb/compiler/rustc_borrowck/src/type_check/free_region_relations.rs#L258-L332
6161
[`fn assumed_wf_types`]: https://github.com/rust-lang/rust/blob/5b8bc568d28b2e922290c9a966b3231d0ce9398b/compiler/rustc_ty_utils/src/implied_bounds.rs#L21

0 commit comments

Comments
 (0)