forked from rust-lang/rust-clippy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nonminimal_bool_methods.stderr
101 lines (84 loc) · 3.23 KB
/
nonminimal_bool_methods.stderr
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:10:13
|
LL | let _ = !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:12:13
|
LL | let _ = !a.is_none();
| ^^^^^^^^^^^^ help: try: `a.is_some()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:14:13
|
LL | let _ = !b.is_err();
| ^^^^^^^^^^^ help: try: `b.is_ok()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:16:13
|
LL | let _ = !b.is_ok();
| ^^^^^^^^^^ help: try: `b.is_err()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:18:13
|
LL | let _ = !(a.is_some() && !c);
| ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() || c`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:19:13
|
LL | let _ = !(a.is_some() || !c);
| ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() && c`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:20:26
|
LL | let _ = !(!c ^ c) || !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:21:25
|
LL | let _ = (!c ^ c) || !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:22:23
|
LL | let _ = !c ^ c || !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:94:8
|
LL | if !res.is_ok() {}
| ^^^^^^^^^^^^ help: try: `res.is_err()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:95:8
|
LL | if !res.is_err() {}
| ^^^^^^^^^^^^^ help: try: `res.is_ok()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:98:8
|
LL | if !res.is_some() {}
| ^^^^^^^^^^^^^^ help: try: `res.is_none()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:99:8
|
LL | if !res.is_none() {}
| ^^^^^^^^^^^^^^ help: try: `res.is_some()`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:115:8
|
LL | if !(a as u64 >= b) {}
| ^^^^^^^^^^^^^^^^ help: try: `(a as u64) < b`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:116:8
|
LL | if !((a as u64) >= b) {}
| ^^^^^^^^^^^^^^^^^^ help: try: `(a as u64) < b`
error: this boolean expression can be simplified
--> tests/ui/nonminimal_bool_methods.rs:117:8
|
LL | if !(a as u64 <= b) {}
| ^^^^^^^^^^^^^^^^ help: try: `a as u64 > b`
error: aborting due to 16 previous errors