]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[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, clippy::unnecessary_operation)]
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 }