]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/cfg_attr_rustfmt.fixed
Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov
[rust.git] / src / tools / clippy / tests / ui / cfg_attr_rustfmt.fixed
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     #[rustfmt::skip]
19     5+3;
20 }
21
22 #[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 }
32
33 #[clippy::msrv = "1.29"]
34 fn msrv_1_29() {
35     #[cfg_attr(rustfmt, rustfmt::skip)]
36     1+29;
37 }
38
39 #[clippy::msrv = "1.30"]
40 fn msrv_1_30() {
41     #[rustfmt::skip]
42     1+30;
43 }