]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/needless_bool/simple.stderr
Auto merge of #90948 - oli-obk:🧹, r=nikomatsakis
[rust.git] / src / tools / clippy / tests / ui / needless_bool / simple.stderr
1 error: this if-then-else expression will always return true
2   --> $DIR/simple.rs:14:5
3    |
4 LL | /     if x {
5 LL | |         true
6 LL | |     } else {
7 LL | |         true
8 LL | |     };
9    | |_____^
10    |
11    = note: `-D clippy::needless-bool` implied by `-D warnings`
12
13 error: this if-then-else expression will always return false
14   --> $DIR/simple.rs:19:5
15    |
16 LL | /     if x {
17 LL | |         false
18 LL | |     } else {
19 LL | |         false
20 LL | |     };
21    | |_____^
22
23 error: this if-then-else expression will always return true
24   --> $DIR/simple.rs:34:5
25    |
26 LL | /     if x {
27 LL | |         return true;
28 LL | |     } else {
29 LL | |         return true;
30 LL | |     };
31    | |_____^
32
33 error: this if-then-else expression will always return false
34   --> $DIR/simple.rs:42:5
35    |
36 LL | /     if x {
37 LL | |         return false;
38 LL | |     } else {
39 LL | |         return false;
40 LL | |     };
41    | |_____^
42
43 error: aborting due to 4 previous errors
44