Open
Description
I'm disabling rustfmt for some lines of my code because I have functions with multiple arguments and for the sake of exposing the logical reasoning of the algorithm, I want to group them on multiple lines. Therefore, I am using:
#[cfg_attr(rustfmt, rustfmt_skip)]
...
Running cargo clippy
tells me:
`cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
...
help: use: `#[rustfmt::skip]`
However, if I replace these with #[rustfmt::skip]
, I'm getting the following error:
error[E0658]: attributes on expressions are experimental
...
note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
I assume it is a bug for a tool in stable Rust to suggest to use an experimental code to replace valid (although deprecated) code.
Meta
rustc --version --verbose
:
rustc 1.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-unknown-linux-gnu
release: 1.53.0
LLVM version: 12.0.1