Skip to content

Commit ccfa5f6

Browse files
committed
Add tests
1 parent 79d1224 commit ccfa5f6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/ui/cfg_attr_lint.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: `cfg_attr` is deprecated for rustfmt and got replaced by tool_attributes
2+
--> $DIR/cfg_attr_lint.rs:8:1
3+
|
4+
8 | #[cfg_attr(rustfmt, rustfmt_skip)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
6+
|
7+
= note: `-D clippy::deprecated-cfg-attr` implied by `-D warnings`
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)