[WIP] Region inference: Use outlives-static constraints in constraint search by amandasystems · Pull Request #140737 · rust-lang/rust (original) (raw)

Revise the extra r: 'static constraints added upon universe issues to add an explanation, and use that explanation during constraint blame search. This greatly simplifies the region inference logic, which now does not need to reverse-engineer the event that caused a region to outlive 'static.

This cosmetically changes the output of two UI tests. I blessed them i separate commits with separate motivations, but that can of course be squashed as desired. We probably want that.

The PR was extracted out of #130227 and consists of one-third of its functional payload. It is based on #140466, so that has to land first.

We probably want a perf run of this. It shouldn't have much of an impact and a positive one if any, but I have been wrong before. In particular, SCC annotations are heavier now.

r? lcnr