Skip to content

Warnings about removed lints may want to itself become a lint #31141

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

Closed
alexcrichton opened this issue Jan 23, 2016 · 4 comments
Closed

Warnings about removed lints may want to itself become a lint #31141

alexcrichton opened this issue Jan 23, 2016 · 4 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@alexcrichton
Copy link
Member

Right now the warnings about a removed lint is a full-fledged warning in the compiler, which primarily means that it is not affected by --cap-lints allow. Note that -A warnings does indeed suppress the warning, but Cargo no longer pases -A warnings.

This ends up meaning that if you just updated to Rust 1.6 (where raw_pointer_derive was removed) and recompile your project, you're actually pretty likely to get tons of these warnings from all your upstream dependencies. (although you yourself are unlikely to have allow(raw_pointer_derive). Ideally these warnings would behave like other lint warnings in Cargo, which is that they are ignored in dependencies by default (e.g. suppressed via --cap-lints allow).

cc @wycats (reporter)
cc @brson (implementor)

@alexcrichton alexcrichton added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Jan 23, 2016
@alexcrichton
Copy link
Member Author

As another concrete example, the libc 0.1, openssl-sys 0.7.4, curl-sys, and curl crates all had the raw_pointer_derive lint explicitly as #[allow], and I found that at least a bunch of the projects I was working with depended on one of these at some point, which meant that there were lots of warnings when updating to 1.6

@alexcrichton
Copy link
Member Author

cc #30878

@retep998
Copy link
Member

Funnily enough, the warning for an invalid lint is actually a lint so you can disable warnings for invalid lints, but not removed lints.

@brson
Copy link
Contributor

brson commented Jan 27, 2016

I agree.

brson added a commit to brson/rust that referenced this issue Mar 23, 2016
This adds the `renamed_and_removed_lints` warning, defaulting
to the warning level.

Fixes rust-lang#31141
bors added a commit that referenced this issue Mar 24, 2016
Make warnings of renamed and removed lints themselves lints

This adds the `renamed_and_removed_lints` warning, defaulting
to the warning level.

Fixes #31141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

3 participants