feature request: #[feature]
awareness in MSRV-gated lints · Issue #14477 · rust-lang/rust-clippy (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Some lints, such as borrow_as_ptr
have conditional behavior based on MSRV:
let (suggestion, span) = if msrv.meets(cx, msrvs::RAW_REF_OP) { |
---|
In Rust-for-Linux, this is not sufficient because we enable a number of unstable features when we are reasonably confident their behavior won't change before stabilization, or because we know they have been stabilized without API change in a version that exceeds our configured MSRV.
It would be extremely helpful if these MSRV checks could be taught to also respect #[feature]
attributes that enable unstable features ahead of the MSRV having been met. This is especially tricky when API has actually changed between the configured MSRV and the feature's actual stabilization.