mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Add test for non-crate-level inner attributes
This commit is contained in:
parent
a770d8edd0
commit
352da1d33d
2 changed files with 16 additions and 2 deletions
|
@ -6,4 +6,12 @@
|
|||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
fn main() {}
|
||||
fn main() {
|
||||
foo::f();
|
||||
}
|
||||
|
||||
mod foo {
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
pub fn f() {}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,11 @@ error: `cfg_attr` is deprecated for rustfmt and got replaced by tool_attributes
|
|||
|
|
||||
= note: `-D clippy::deprecated-cfg-attr` implied by `-D warnings`
|
||||
|
||||
error: aborting due to previous error
|
||||
error: `cfg_attr` is deprecated for rustfmt and got replaced by tool_attributes
|
||||
--> $DIR/cfg_attr_lint.rs:14:5
|
||||
|
|
||||
14 | #![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#![rustfmt::skip]`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
Loading…
Reference in a new issue