Skip to content
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

Use clippy's MSRV support when available #227

Closed
jonasbb opened this issue Dec 17, 2020 · 2 comments
Closed

Use clippy's MSRV support when available #227

jonasbb opened this issue Dec 17, 2020 · 2 comments

Comments

@jonasbb
Copy link
Owner

jonasbb commented Dec 17, 2020

Nightly clippy supports specifying the MSRV which disables lints incompatible with this Rust versions, e.g., because it requires library functions not yet available.
https://github.com/rust-lang/rust-clippy/blob/master/README.md#specifying-the-minimum-supported-rust-version
This is not yet available on stable clippy, so it cannot be used yet, since then clippy complains about unknown keys in the config file.
The alternative, custom inner attributes, is not yet stable in Rust and also cannot be used.

At some point, clippy will hopefully support the rust-version field from Cargo.toml (rust-lang/rust-clippy#7765) such that it is not necessary to have a separate configuration just for clippy.

@hellow554
Copy link

rust-lang/rust-clippy#8774 has been merged and will be available on nightly once clippy has been updated in the main repo. Just for your information ;)

Don't know when it hits stable, probably 1.64.

@jonasbb
Copy link
Owner Author

jonasbb commented Jun 28, 2022

Thanks for the information and for actually implementing the feature :) That hopefully means that future clippy versions will make fewer bad suggestions. The MSRV on the master branch is currently quite high, so this will likely not affect many places.

@jonasbb jonasbb closed this as completed Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants