]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs
Auto merge of #71751 - oli-obk:const_ice, r=RalfJung
[rust.git] / src / tools / clippy / tests / ui / cfg_attr_rustfmt.rs
1 // run-rustfix
2 #![feature(stmt_expr_attributes)]
3
4 #![allow(unused, clippy::no_effect)]
5 #![warn(clippy::deprecated_cfg_attr)]
6
7 // This doesn't get linted, see known problems
8 #![cfg_attr(rustfmt, rustfmt_skip)]
9
10 #[rustfmt::skip]
11 trait Foo
12 {
13 fn foo(
14 );
15 }
16
17 fn skip_on_statements() {
18     #[cfg_attr(rustfmt, rustfmt::skip)]
19     5+3;
20 }
21
22 #[cfg_attr(rustfmt, rustfmt_skip)]
23 fn main() {
24     foo::f();
25 }
26
27 mod foo {
28     #![cfg_attr(rustfmt, rustfmt_skip)]
29
30     pub fn f() {}
31 }