Introduce MSRV for lints, and lint against cfg(any()/all()) on Rust 1.88+#149870
Introduce MSRV for lints, and lint against cfg(any()/all()) on Rust 1.88+#149870clubby789 wants to merge 3 commits intorust-lang:mainfrom
Conversation
|
cc @davidtwco, @compiler-errors, @TaKO8Ki The Miri subtree was changed cc @rust-lang/miri Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred in compiler/rustc_attr_parsing This PR modifies |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
That's an odd way to pass information from cargo to rustc. Usually we use command-line flags for that. Is there any precedent for rustc parsing a CARGO_* env var? |
|
@rustbot reroll I don't have experience with lint system. |
|
There's rust/compiler/rustc_metadata/src/creader.rs Lines 1275 to 1276 in f520900 If an |
Those are ad-hoc workarounds and largely only affect diagnostics. We can remove it any time, it's not part of the stable API of (The use in
I think that would be much more in line with the existing interface of |
|
☔ The latest upstream changes (presumably #149645) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@rustbot blocked on mcp (and ci failing hehe) |
Split out from #149791
Currently duplicates a custom simple version parser, could instead add a dep on
semverto do parsing.msrvfield to DiagCtxtInner, parsed fromCARGO_PKG_RUST_VERSIONif presentrust_versionfield toDiagInner, controlled by adding, msrv = "1.xx.0"to a#[diag]