rust/compiler/rustc_trait_selection/src
Matthias Krüger d02a221d31
Rollup merge of #102945 - compiler-errors:placeholder-region-outlives, r=lcnr
Do not register placeholder `RegionOutlives` obligations when `considering_regions` is false

**NOTE:** I'm kinda just putting this up for discussion. I'm not certain this is correct...?

This was introduced in [`608625d`](608625dae9 (diff-6e54b18681342ec725d75591dbf384ad08cd73df29db00485fe51b4e90f76ff7R361)).

Interestingly, we only check `data.has_placeholders()` for `RegionOutlives`, and not for `TypeOutlives`... why? For the record, that different treatment between `RegionOutlives` and `TypeOutlives` is why the fix "The compiling succeeds when all `'a : 'b` are replaced with `&'a () : 'b`" in #100689 _"works"_, but it seems like an implementation detail considering this.

Also, why do we care about placeholder regions being registered if `considering_regions` is false? It doesn't seem to affect any UI tests, for example.

r? `@lcnr`

Fixes #102899
Fixes #100689
2022-10-17 17:15:50 +02:00
..
traits Rollup merge of #102945 - compiler-errors:placeholder-region-outlives, r=lcnr 2022-10-17 17:15:50 +02:00
autoderef.rs Remove TypeckResults from InferCtxt 2022-10-07 07:06:19 -05:00
errors.rs rename Unevaluated to UnevaluatedConst 2022-09-23 14:27:34 +02:00
infer.rs Change InferCtxtBuilder from enter to build 2022-10-07 07:10:40 -05:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00