-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove LintBuffer from Session #65835
Conversation
I plan to prepare some similar documentation to what I'm working on now in rust-lang/rustc-dev-guide#476 once this lands -- we don't have a lot that talks about lint buffering today, but I've gained a decent understanding of why we need it in working on this so can write that up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I left one small suggestion to add a helper method. r=me with that suggestion.
1ab8dc8
to
a44126a
Compare
@bors r=nikomatsakis |
📌 Commit a44126a has been approved by |
…, r=nikomatsakis Remove LintBuffer from Session This moves the `LintBuffer` from `Session` into the `Resolver`, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so. I suspect that with a bit more work a similar move could be done for the lint buffer inside `ParseSess`, but this PR doesn't touch it (in part to keep itself small). The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.
Possibly caused failure in #65854 (comment), @bors rollup=never |
☔ The latest upstream changes (presumably #65869) made this pull request unmergeable. Please resolve the merge conflicts. |
a44126a
to
bdcaedf
Compare
@bors r=nikomatsakis rollup=never I can't reproduce the rollup failure locally so I suspect/hope it is #65830 that is responsible (that seems more likely than this PR, personally, given the small number of errors, and being limited to dead code, though that PR doesn't look immediately at fault either. |
📌 Commit bdcaedf1572a99a67919f686dd78c307918d9c48 has been approved by |
⌛ Testing commit bdcaedf1572a99a67919f686dd78c307918d9c48 with merge d9d421ee53ed6e62dc900005b3db019ccbb4606d... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
This allows us to directly pass in a lint buffer
bdcaedf
to
c68df7c
Compare
@bors r=nikomatsakis |
📌 Commit c68df7c has been approved by |
…sakis Remove LintBuffer from Session This moves the `LintBuffer` from `Session` into the `Resolver`, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so. I suspect that with a bit more work a similar move could be done for the lint buffer inside `ParseSess`, but this PR doesn't touch it (in part to keep itself small). The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.
☀️ Test successful - checks-azure |
This moves the
LintBuffer
fromSession
into theResolver
, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so.I suspect that with a bit more work a similar move could be done for the lint buffer inside
ParseSess
, but this PR doesn't touch it (in part to keep itself small).The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.