]> git.lizzy.rs Git - rust.git/blob - tests/ui/nonminimal_bool.stderr
Add size_of_ref lint
[rust.git] / tests / ui / nonminimal_bool.stderr
1 error: this boolean expression can be simplified
2   --> $DIR/nonminimal_bool.rs:11:13
3    |
4 LL |     let _ = !true;
5    |             ^^^^^ help: try: `false`
6    |
7    = note: `-D clippy::nonminimal-bool` implied by `-D warnings`
8
9 error: this boolean expression can be simplified
10   --> $DIR/nonminimal_bool.rs:12:13
11    |
12 LL |     let _ = !false;
13    |             ^^^^^^ help: try: `true`
14
15 error: this boolean expression can be simplified
16   --> $DIR/nonminimal_bool.rs:13:13
17    |
18 LL |     let _ = !!a;
19    |             ^^^ help: try: `a`
20
21 error: this boolean expression can be simplified
22   --> $DIR/nonminimal_bool.rs:14:13
23    |
24 LL |     let _ = false || a;
25    |             ^^^^^^^^^^ help: try: `a`
26
27 error: this boolean expression can be simplified
28   --> $DIR/nonminimal_bool.rs:18:13
29    |
30 LL |     let _ = !(!a && b);
31    |             ^^^^^^^^^^ help: try: `a || !b`
32
33 error: this boolean expression can be simplified
34   --> $DIR/nonminimal_bool.rs:19:13
35    |
36 LL |     let _ = !(!a || b);
37    |             ^^^^^^^^^^ help: try: `a && !b`
38
39 error: this boolean expression can be simplified
40   --> $DIR/nonminimal_bool.rs:20:13
41    |
42 LL |     let _ = !a && !(b && c);
43    |             ^^^^^^^^^^^^^^^ help: try: `!(a || b && c)`
44
45 error: this boolean expression can be simplified
46   --> $DIR/nonminimal_bool.rs:28:13
47    |
48 LL |     let _ = a == b && c == 5 && a == b;
49    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
50    |
51 help: try
52    |
53 LL |     let _ = !(a != b || c != 5);
54    |             ~~~~~~~~~~~~~~~~~~~
55 LL |     let _ = a == b && c == 5;
56    |             ~~~~~~~~~~~~~~~~
57
58 error: this boolean expression can be simplified
59   --> $DIR/nonminimal_bool.rs:29:13
60    |
61 LL |     let _ = a == b || c == 5 || a == b;
62    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
63    |
64 help: try
65    |
66 LL |     let _ = !(a != b && c != 5);
67    |             ~~~~~~~~~~~~~~~~~~~
68 LL |     let _ = a == b || c == 5;
69    |             ~~~~~~~~~~~~~~~~
70
71 error: this boolean expression can be simplified
72   --> $DIR/nonminimal_bool.rs:30:13
73    |
74 LL |     let _ = a == b && c == 5 && b == a;
75    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
76    |
77 help: try
78    |
79 LL |     let _ = !(a != b || c != 5);
80    |             ~~~~~~~~~~~~~~~~~~~
81 LL |     let _ = a == b && c == 5;
82    |             ~~~~~~~~~~~~~~~~
83
84 error: this boolean expression can be simplified
85   --> $DIR/nonminimal_bool.rs:31:13
86    |
87 LL |     let _ = a != b || !(a != b || c == d);
88    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89    |
90 help: try
91    |
92 LL |     let _ = !(a == b && c == d);
93    |             ~~~~~~~~~~~~~~~~~~~
94 LL |     let _ = a != b || c != d;
95    |             ~~~~~~~~~~~~~~~~
96
97 error: this boolean expression can be simplified
98   --> $DIR/nonminimal_bool.rs:32:13
99    |
100 LL |     let _ = a != b && !(a != b && c == d);
101    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102    |
103 help: try
104    |
105 LL |     let _ = !(a == b || c == d);
106    |             ~~~~~~~~~~~~~~~~~~~
107 LL |     let _ = a != b && c != d;
108    |             ~~~~~~~~~~~~~~~~
109
110 error: this boolean expression can be simplified
111   --> $DIR/nonminimal_bool.rs:62:8
112    |
113 LL |     if matches!(true, true) && true {
114    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(true, true)`
115
116 error: aborting due to 13 previous errors
117