-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Re-add raw_pointer_derive lint as a no-op #30346
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
Comments
Policy-wise this is similar but (imo) different to our policy of allowing changes to lints to break code. E.g. |
It looks like the breakage is due to I do vaguely recall reaching the conclusion at some point, however, about not removing lints. I don't remember the reason, however, so I'd want to discuss this a bit before reverting. |
Two more crates broke in the latest report. |
Don't we have a cargo feature that ensures that warnings (lints) changes are of very low impact, i.e. don't really break things that depend on the crate, for example. |
Yep, lints are capped at allowed for dependencies. Changing this one to be a no-op and maybe adding a default-warn |
Another regression popped up in this report. accumulator-0.1.3 |
Also containerof-0.2.1, memory_map-0.0.3. Edit: oh accumulator and memory_map were already known from a previous report. I think containerof is new. |
After updating the regression sheet I count 7 crates affected by this. |
@nikomatsakis and I discussed that we'd prefer removed lints indicate they were removed with a warning instead of saying 'unknown lint'. I may try to get a patch together that does this. |
triage: P-high (it is questionable about whether this should be classified as a "regression" per se, in terms of what the impact actually is of this sort of change if you aren't opting into stronger lint settings. but anyway, we want to handle this case better.) |
It seems there is a mechanism for registering that a lint has been removed, why didn't we use that? I think we ought to. |
I will try adding it back as a removed lint and making sure it doesn't cause build failures. |
I've gotten in to yak shaving with the code for registering renamed and removed lints. It doesn't have test coverage and has some issues. Still expect to get a patch in. |
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
…erive cc rust-lang#30346 Conflicts: src/librustc_lint/lib.rs
Is this not fixed? |
@brson ^^ :) |
Done in #30878 |
Removed in #29882, causing breakage to maidsafe_utilities.
I recall at some point we decided never to remove lints because of this very problem and simply convert them to no-ops.
The text was updated successfully, but these errors were encountered: