-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc: Fix bugs in renamed and removed lints and re-add raw_pointer_derive #30878
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
Conversation
e86f816
to
a13b094
Compare
a13b094
to
d46117b
Compare
Level::Forbid => "-F", | ||
}, | ||
lint_name); | ||
sess.note_without_error(&msg); |
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.
Use a structural error (you probably would want to return one from check_lint_name
in some form?)
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.
Ah, yes, this is true. It'd be better to return the error and attach the note to it -- that would also mean that the caller is always the one that ultimately reports all warnings/errors, which seems good.
This looks good to me, though I think that restructuring to return a |
d46117b
to
a9efbeb
Compare
r? @nikomatsakis I've addressed all points. |
@rust-lang/compiler I tagged this beta-accepted, assuming you would be cool with it. @nikomatsakis and I at least have discussed it a lot. |
r=me modulo nits, and I think backporting makes sense. Looks pretty non-invasive. |
a9efbeb
to
ca81d3d
Compare
r=nikomatsakis |
…erive cc rust-lang#30346
@bors r+ p=1 |
📌 Commit ca81d3d has been approved by |
This adds back the raw_pointer_derive lint as a 'removed' lint, so that its removal does not cause errors (#30346) but warnings. In the process I discovered regressions in the code for renamed and removed lints, which didn't appear to have any tests. The addition of a second lint pass (ast vs. hir) meant that attributes were being inspected twice, renamed and removed warnings printed twice. I restructured the code so these tests are only done once and added tests. Unfortunately it makes the patch more complicated for the needed beta backport. r? @nikomatsakis
This adds back the raw_pointer_derive lint as a 'removed' lint, so that its removal does not cause errors (#30346) but warnings.
In the process I discovered regressions in the code for renamed and removed lints, which didn't appear to have any tests. The addition of a second lint pass (ast vs. hir) meant that attributes were being inspected twice, renamed and removed warnings printed twice. I restructured the code so these tests are only done once and added tests. Unfortunately it makes the patch more complicated for the needed beta backport.
r? @nikomatsakis