blob: 077e9b5df47cf363a77a366b7604d1cffa8b43d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
error: this if-then-else expression will always return true
--> tests/ui/needless_bool/simple.rs:14:5
|
LL | / if x {
LL | | true
LL | | } else {
LL | | true
LL | | };
| |_____^
|
= note: `-D clippy::needless-bool` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_bool)]`
error: this if-then-else expression will always return false
--> tests/ui/needless_bool/simple.rs:20:5
|
LL | / if x {
LL | | false
LL | | } else {
LL | | false
LL | | };
| |_____^
error: this if-then-else expression will always return true
--> tests/ui/needless_bool/simple.rs:36:5
|
LL | / if x {
LL | | return true;
LL | | } else {
LL | | return true;
LL | | };
| |_____^
error: this if-then-else expression will always return false
--> tests/ui/needless_bool/simple.rs:45:5
|
LL | / if x {
LL | | return false;
LL | | } else {
LL | | return false;
LL | | };
| |_____^
error: aborting due to 4 previous errors
|