1 #![warn(clippy::all)]
2 #![allow(unused_variables)]
3 #![allow(unused_assignments)]
4 #![allow(clippy::if_same_then_else)]
5 #![allow(clippy::deref_addrof)]
6 #![allow(clippy::nonminimal_bool)]
7 
foo() -> bool8 fn foo() -> bool {
9     true
10 }
11 
12 #[rustfmt::skip]
main()13 fn main() {
14     // weird op_eq formatting:
15     let mut a = 42;
16     a =- 35;
17     a =* &191;
18 
19     let mut b = true;
20     b =! false;
21 
22     // those are ok:
23     a = -35;
24     a = *&191;
25     b = !false;
26 
27     // possible missing comma in an array
28     let _ = &[
29         -1, -2, -3 // <= no comma here
30         -4, -5, -6
31     ];
32     let _ = &[
33         -1, -2, -3 // <= no comma here
34         *4, -5, -6
35     ];
36 
37     // those are ok:
38     let _ = &[
39         -1, -2, -3,
40         -4, -5, -6
41     ];
42     let _ = &[
43         -1, -2, -3,
44         -4, -5, -6,
45     ];
46     let _ = &[
47         1 + 2, 3 +
48         4, 5 + 6,
49     ];
50 
51     // don't lint for bin op without unary equiv
52     // issue 3244
53     vec![
54         1
55         / 2,
56     ];
57     // issue 3396
58     vec![
59         true
60         | false,
61     ];
62 
63     // don't lint if the indentation suggests not to
64     let _ = &[
65         1 + 2, 3
66                 - 4, 5
67     ];
68     // lint if it doesn't
69     let _ = &[
70         -1
71         -4,
72     ];
73 }
74