Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove LintBuffer from Session #65835
Conversation
This comment has been minimized.
This comment has been minimized.
I plan to prepare some similar documentation to what I'm working on now in rust-lang/rustc-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. |
Looks good to me! I left one small suggestion to add a helper method. r=me with that suggestion. |
1ab8dc8
to
a44126a
This comment has been minimized.
This comment has been minimized.
@bors r=nikomatsakis |
This comment has been minimized.
This comment has been minimized.
|
…, 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.
Rollup of 7 pull requests Successful merges: - #65288 (Point at associated type for some obligations) - #65541 (rustc: add `Span`s to `inferred_outlives_of` predicates.) - #65738 (Coherence should allow fundamental types to impl traits when they are local) - #65777 (Don't ICE for completely unexpandable `impl Trait` types) - #65830 (Use ident.span instead of def_span in dead-code pass) - #65834 (Remove lint callback from driver) - #65835 (Remove LintBuffer from Session) Failed merges: r? @ghost
This comment has been minimized.
This comment has been minimized.
Possibly caused failure in #65854 (comment), @bors rollup=never |
This comment has been minimized.
This comment has been minimized.
|
a44126a
to
bdcaedf
This comment has been minimized.
This comment has been minimized.
@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. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
…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.
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
|
bdcaedf
to
c68df7c
This comment has been minimized.
This comment has been minimized.
@bors r=nikomatsakis |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
…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.
This comment has been minimized.
This comment has been minimized.
|
Mark-Simulacrum commentedOct 25, 2019
•
edited
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.