Perform lifetime resolution on the AST for lowering#91557
Merged
bors merged 8 commits intorust-lang:masterfrom Apr 28, 2022
Merged
Perform lifetime resolution on the AST for lowering#91557bors merged 8 commits intorust-lang:masterfrom
bors merged 8 commits intorust-lang:masterfrom
Conversation
Contributor
|
Some changes occurred in src/tools/rustfmt. |
cf0a7cf to
7a82c55
Compare
Contributor
|
Blocked on #91403. |
7a82c55 to
fbaff1a
Compare
This comment has been minimized.
This comment has been minimized.
312028b to
1aed8ce
Compare
This comment has been minimized.
This comment has been minimized.
1aed8ce to
815a52e
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
815a52e to
89e9723
Compare
This comment has been minimized.
This comment has been minimized.
89e9723 to
80435dc
Compare
This comment has been minimized.
This comment has been minimized.
80435dc to
a9e0018
Compare
This comment has been minimized.
This comment has been minimized.
a9e0018 to
ab6b005
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
ab6b005 to
5f1723b
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
5f1723b to
ac45362
Compare
This comment has been minimized.
This comment has been minimized.
cdcc78b to
21b6d23
Compare
Contributor
Author
|
@bors r=petrochenkov |
Collaborator
|
📌 Commit 21b6d23 has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
This was referenced Apr 28, 2022
Merged
Collaborator
|
Finished benchmarking commit (c95346b): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Contributor
|
This caused a regression on nightly. The beta cutoff is somewhat soonish, so if we can't land a fix by next week we should revert and try again in a new pr |
Contributor
|
Regression issue: #96540 |
This was referenced May 19, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Lifetime resolution is currently implemented several times. Once during lowering in order to introduce in-band lifetimes, and once in the resolve_lifetimes query. However, due to the global nature of lifetime resolution and how it interferes with hygiene, it is better suited on the AST.
This PR implements a first draft of lifetime resolution on the AST. For now, we specifically target named lifetimes and everything we need to remove lifetime resolution from lowering. Some diagnostics have already been ported, and sometimes made more precise using available hygiene information. Follow-up PRs will address in particular the resolution of anonymous lifetimes on the AST.
We reuse the rib design of the current resolution framework. Specific
LifetimeRibandLifetimeRibKindtypes are introduced. The most important variant isLifetimeRibKind::Generics, which happens each time we encounter something which may introduce generic lifetime parameters. It can be an item or afor<...>binder. TheLifetimeBinderKindspecifies how this rib behaves with respect to in-band lifetimes.r? @petrochenkov