Move placeholder handling to a proper preprocessing step #140466
+419
−287
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 commit breaks out the logic of placheolder rewriting into its own preprocessing step. It's one of the more boring
parts of #130227.
The only functional change from this is that the preprocessing step (where extra
r: 'static
constraints are added) is performed upstream of Polonius legacy, finally affecting Polonius. That is mostly a by-product, though.This should be reviewable by anyone in the compiler team, so
r? rust-lang/compiler
I am marking this as WIP because in order for it to not interfere with my own in-review PR, I have based it on the branch of #139965. It should be reviewable despite this though.