Automatically set MSRV for code under `#[cfg(version)]`
Fixes https://github.com/rust-lang/rust-clippy/issues/14827
Semantics:
- If there is both
#[clippy::msrv]and#[cfg(version)]applying to the same node#[clippy::msrv]wins - When negated with
not()version bounds are ignored (if double/quad/etc negated it will be applied once more) - Inside
all/anythe lowest found version is used
When the feature is stable we can go back and improve the docs a bit more with a better example
changelog: code using #[cfg(version)] will have the MSRV automatically detected
r? @samueltardieu
rustbot has assigned @samueltardieu. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
r? @flip1995
Thanks.
Sorry, I forgot I wanted to let @flip1995 weight in.
Blocked on https://github.com/rust-lang/rust/pull/141766#issuecomment-2946372974
:umbrella: The latest upstream changes (possibly #14896) made this pull request unmergeable. Please resolve the merge conflicts.
https://github.com/rust-lang/rust/pull/141766 was killed by bikeshedding again