We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79d1224 commit ccfa5f6Copy full SHA for ccfa5f6
tests/ui/cfg_attr_lint.rs
@@ -0,0 +1,9 @@
1
+#![feature(tool_lints)]
2
+
3
+#![warn(clippy::deprecated_cfg_attr)]
4
5
+// This doesn't get linted, see known problems
6
+#![cfg_attr(rustfmt, rustfmt_skip)]
7
8
+#[cfg_attr(rustfmt, rustfmt_skip)]
9
+fn main() {}
tests/ui/cfg_attr_lint.stderr
@@ -0,0 +1,10 @@
+error: `cfg_attr` is deprecated for rustfmt and got replaced by tool_attributes
+ --> $DIR/cfg_attr_lint.rs:8:1
+ |
+8 | #[cfg_attr(rustfmt, rustfmt_skip)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
+ = note: `-D clippy::deprecated-cfg-attr` implied by `-D warnings`
+error: aborting due to previous error
10
0 commit comments