1
1
error: this if-then-else expression returns a bool literal
2
- --> $DIR/fixable.rs:39 :5
2
+ --> $DIR/fixable.rs:40 :5
3
3
|
4
4
LL | / if x {
5
5
LL | | true
@@ -11,7 +11,7 @@ LL | | };
11
11
= note: `-D clippy::needless-bool` implied by `-D warnings`
12
12
13
13
error: this if-then-else expression returns a bool literal
14
- --> $DIR/fixable.rs:44 :5
14
+ --> $DIR/fixable.rs:45 :5
15
15
|
16
16
LL | / if x {
17
17
LL | | false
@@ -21,7 +21,7 @@ LL | | };
21
21
| |_____^ help: you can reduce it to: `!x`
22
22
23
23
error: this if-then-else expression returns a bool literal
24
- --> $DIR/fixable.rs:49 :5
24
+ --> $DIR/fixable.rs:50 :5
25
25
|
26
26
LL | / if x && y {
27
27
LL | | false
@@ -31,7 +31,7 @@ LL | | };
31
31
| |_____^ help: you can reduce it to: `!(x && y)`
32
32
33
33
error: this if-then-else expression returns a bool literal
34
- --> $DIR/fixable.rs:69 :5
34
+ --> $DIR/fixable.rs:70 :5
35
35
|
36
36
LL | / if x {
37
37
LL | | return true;
@@ -41,7 +41,7 @@ LL | | };
41
41
| |_____^ help: you can reduce it to: `return x`
42
42
43
43
error: this if-then-else expression returns a bool literal
44
- --> $DIR/fixable.rs:77 :5
44
+ --> $DIR/fixable.rs:78 :5
45
45
|
46
46
LL | / if x {
47
47
LL | | return false;
@@ -51,7 +51,7 @@ LL | | };
51
51
| |_____^ help: you can reduce it to: `return !x`
52
52
53
53
error: this if-then-else expression returns a bool literal
54
- --> $DIR/fixable.rs:85 :5
54
+ --> $DIR/fixable.rs:86 :5
55
55
|
56
56
LL | / if x && y {
57
57
LL | | return true;
@@ -61,7 +61,7 @@ LL | | };
61
61
| |_____^ help: you can reduce it to: `return x && y`
62
62
63
63
error: this if-then-else expression returns a bool literal
64
- --> $DIR/fixable.rs:93 :5
64
+ --> $DIR/fixable.rs:94 :5
65
65
|
66
66
LL | / if x && y {
67
67
LL | | return false;
@@ -71,33 +71,33 @@ LL | | };
71
71
| |_____^ help: you can reduce it to: `return !(x && y)`
72
72
73
73
error: equality checks against true are unnecessary
74
- --> $DIR/fixable.rs:101 :8
74
+ --> $DIR/fixable.rs:102 :8
75
75
|
76
76
LL | if x == true {};
77
77
| ^^^^^^^^^ help: try simplifying it as shown: `x`
78
78
|
79
79
= note: `-D clippy::bool-comparison` implied by `-D warnings`
80
80
81
81
error: equality checks against false can be replaced by a negation
82
- --> $DIR/fixable.rs:105 :8
82
+ --> $DIR/fixable.rs:106 :8
83
83
|
84
84
LL | if x == false {};
85
85
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
86
86
87
87
error: equality checks against true are unnecessary
88
- --> $DIR/fixable.rs:115 :8
88
+ --> $DIR/fixable.rs:116 :8
89
89
|
90
90
LL | if x == true {};
91
91
| ^^^^^^^^^ help: try simplifying it as shown: `x`
92
92
93
93
error: equality checks against false can be replaced by a negation
94
- --> $DIR/fixable.rs:116 :8
94
+ --> $DIR/fixable.rs:117 :8
95
95
|
96
96
LL | if x == false {};
97
97
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
98
98
99
99
error: this if-then-else expression returns a bool literal
100
- --> $DIR/fixable.rs:125 :12
100
+ --> $DIR/fixable.rs:126 :12
101
101
|
102
102
LL | } else if returns_bool() {
103
103
| ____________^
0 commit comments