Add test for non-crate-level inner attributes

This commit is contained in:
flip1995 2018-09-18 11:36:59 +02:00 committed by flip1995
parent a770d8edd0
commit 352da1d33d
No known key found for this signature in database
GPG Key ID: E8E897A5870E41C2
2 changed files with 16 additions and 2 deletions

View File

@ -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() {}
}

View File

@ -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