mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
Add test for non-crate-level inner attributes
This commit is contained in:
parent
a770d8edd0
commit
352da1d33d
@ -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 New Issue
Block a user