Proposal
Sometimes diagnostics wish to guide users to using newer Rust features, but suggesting them may cause a crate's MSRV to increase. Clippy has machinery to record where lints are only relevant to certain Rust versions. It would be useful to be able to use this for Rust's own lints - however, this requires knowing the current crate's MSRV, which is not currently exposed to rustc (except via CARGO_PKG_RUST_VERSION).
Introducing a MSRV flag to rustc allows Cargo (and any other tools) to pass this information to rustc with a more standard API (which Clippy may additionally benefit from, as it currently parses the environment variable).
Motivating example: rust-lang/rust#149870
Proposed Policy for Usage
- It should be considered a mild bug for a lint to not respect MSRV
- There should be an approximate cutoff point for where we'll accept bugs, such as 1.64 (i.e. we don't want to have hundreds of bugs for lints which don't respect a MSRV of 1.12.0)
- Non-spammy PRs to add MSRV to existing lints will be accepted
- Any new diagnostics which do require a specific Rust version should have their MSRV applied
Process
The main points of the Major Change Process are as follows:
You can read more about Major Change Proposals on forge.
Proposal
Sometimes diagnostics wish to guide users to using newer Rust features, but suggesting them may cause a crate's MSRV to increase. Clippy has machinery to record where lints are only relevant to certain Rust versions. It would be useful to be able to use this for Rust's own lints - however, this requires knowing the current crate's MSRV, which is not currently exposed to rustc (except via
CARGO_PKG_RUST_VERSION).Introducing a MSRV flag to rustc allows Cargo (and any other tools) to pass this information to rustc with a more standard API (which Clippy may additionally benefit from, as it currently parses the environment variable).
Motivating example: rust-lang/rust#149870
Proposed Policy for Usage
Process
The main points of the Major Change Process are as follows:
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.You can read more about Major Change Proposals on forge.