-
Notifications
You must be signed in to change notification settings - Fork 2k
deprecated_cfg_attr hit in MSRV 1.29.0 #7922
Copy link
Copy link
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Lint name: deprecated_cfg_attr
The suggested code doesn't work in the configured MSRV.
I tried this code:
#[cfg_attr(rustfmt, rustfmt_skip)]
macro_rules! foo {
...
}with this configuration
msrv = "1.29"I expected to see this happen: Clippy should see that #[rustfmt::skip] is not available in 1.29 and ignore it
Instead, this happened: Clippy suggested #[rustfmt::skip], which fails with old version of Rust.
Meta
Rust version (rustc -Vv):
rustc 1.58.0-nightly (18bc4bee9 2021-11-02)
binary: rustc
commit-hash: 18bc4bee9710b181b440a472635150f0d6257713
commit-date: 2021-11-02
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0
@rustbot label +I-suggestion-causes-error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Type
Fields
Give feedbackNo fields configured for issues without a type.