mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Add tests
This commit is contained in:
parent
e1cf160e2a
commit
7bd8c303d3
2 changed files with 19 additions and 0 deletions
9
tests/ui/cfg_attr_lint.rs
Normal file
9
tests/ui/cfg_attr_lint.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
#![feature(tool_lints)]
|
||||
|
||||
#![warn(clippy::deprecated_cfg_attr)]
|
||||
|
||||
// This doesn't get linted, see known problems
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
fn main() {}
|
10
tests/ui/cfg_attr_lint.stderr
Normal file
10
tests/ui/cfg_attr_lint.stderr
Normal file
|
@ -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
|
||||
|
Loading…
Reference in a new issue