Move placeholder error handling to before region inference#142623
Closed
amandasystems wants to merge 11 commits intorust-lang:mainfrom
Closed
Move placeholder error handling to before region inference#142623amandasystems wants to merge 11 commits intorust-lang:mainfrom
amandasystems wants to merge 11 commits intorust-lang:mainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes #130227. It removes precise tracking of placeholders in borrowck, moving them to an earlier stage. This leads to better performance, since we track less information. It is also part of the preparations for Polonius by moving specialised logic out of region inference itself and into the region graph or other, common pre-processing steps. Originally, the intention was to do this in multiple steps, but since some of them incur performance penalties won back by later stages, doing them in one go makes the net results clearer.
Error reporting changes
Trait<r1, r2>, which frequently gives two error messages, one for each region. Under this logic it only gives one.tests/ui/impl-trait/nested-rpit-hrtb.rs, we now also addr: 'static, which causes an extra error. Being more conservative when rewriting the constraint graph and avoiding it when invalid outlives are already detected breaks existing diagnostics for many, many tests that rely on the extrar: 'staticto find out why they error.Due to reason 2., several UI tests change, a lot, since they rely on diagnostic duplication being turned off to find several duplicate errors.
Code structure changes
r? lcnr