Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated_cfg_attr hit in MSRV 1.29.0 #7922

Closed
Kixunil opened this issue Nov 3, 2021 · 2 comments · Fixed by #7944
Closed

deprecated_cfg_attr hit in MSRV 1.29.0 #7922

Kixunil opened this issue Nov 3, 2021 · 2 comments · Fixed by #7944
Assignees
Labels
C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy I-false-positive Issue: The lint was triggered on code it shouldn't have I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied

Comments

@Kixunil
Copy link

Kixunil commented Nov 3, 2021

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

@Kixunil Kixunil added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Nov 3, 2021
@rustbot rustbot added the I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied label Nov 3, 2021
@xFrednet
Copy link
Member

xFrednet commented Nov 3, 2021

@rustbot label +good-first-issue

@xFrednet xFrednet closed this as completed Nov 3, 2021
@rustbot rustbot added the good-first-issue These issues are a good way to get started with Clippy label Nov 3, 2021
@xFrednet xFrednet reopened this Nov 3, 2021
@Serial-ATA
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy I-false-positive Issue: The lint was triggered on code it shouldn't have I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants