]> git.lizzy.rs Git - rust.git/blob - tests/ui/nonminimal_bool_methods.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / nonminimal_bool_methods.stderr
1 error: this boolean expression can be simplified
2   --> $DIR/nonminimal_bool_methods.rs:9:13
3    |
4 LL |     let _ = !a.is_some();
5    |             ^^^^^^^^^^^^ help: try: `a.is_none()`
6    |
7    = note: `-D clippy::nonminimal-bool` implied by `-D warnings`
8
9 error: this boolean expression can be simplified
10   --> $DIR/nonminimal_bool_methods.rs:11:13
11    |
12 LL |     let _ = !a.is_none();
13    |             ^^^^^^^^^^^^ help: try: `a.is_some()`
14
15 error: this boolean expression can be simplified
16   --> $DIR/nonminimal_bool_methods.rs:13:13
17    |
18 LL |     let _ = !b.is_err();
19    |             ^^^^^^^^^^^ help: try: `b.is_ok()`
20
21 error: this boolean expression can be simplified
22   --> $DIR/nonminimal_bool_methods.rs:15:13
23    |
24 LL |     let _ = !b.is_ok();
25    |             ^^^^^^^^^^ help: try: `b.is_err()`
26
27 error: this boolean expression can be simplified
28   --> $DIR/nonminimal_bool_methods.rs:17:13
29    |
30 LL |     let _ = !(a.is_some() && !c);
31    |             ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() || c`
32
33 error: this boolean expression can be simplified
34   --> $DIR/nonminimal_bool_methods.rs:18:13
35    |
36 LL |     let _ = !(a.is_some() || !c);
37    |             ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() && c`
38
39 error: this boolean expression can be simplified
40   --> $DIR/nonminimal_bool_methods.rs:19:26
41    |
42 LL |     let _ = !(!c ^ c) || !a.is_some();
43    |                          ^^^^^^^^^^^^ help: try: `a.is_none()`
44
45 error: this boolean expression can be simplified
46   --> $DIR/nonminimal_bool_methods.rs:20:25
47    |
48 LL |     let _ = (!c ^ c) || !a.is_some();
49    |                         ^^^^^^^^^^^^ help: try: `a.is_none()`
50
51 error: this boolean expression can be simplified
52   --> $DIR/nonminimal_bool_methods.rs:21:23
53    |
54 LL |     let _ = !c ^ c || !a.is_some();
55    |                       ^^^^^^^^^^^^ help: try: `a.is_none()`
56
57 error: this boolean expression can be simplified
58   --> $DIR/nonminimal_bool_methods.rs:93:8
59    |
60 LL |     if !res.is_ok() {}
61    |        ^^^^^^^^^^^^ help: try: `res.is_err()`
62
63 error: this boolean expression can be simplified
64   --> $DIR/nonminimal_bool_methods.rs:94:8
65    |
66 LL |     if !res.is_err() {}
67    |        ^^^^^^^^^^^^^ help: try: `res.is_ok()`
68
69 error: this boolean expression can be simplified
70   --> $DIR/nonminimal_bool_methods.rs:97:8
71    |
72 LL |     if !res.is_some() {}
73    |        ^^^^^^^^^^^^^^ help: try: `res.is_none()`
74
75 error: this boolean expression can be simplified
76   --> $DIR/nonminimal_bool_methods.rs:98:8
77    |
78 LL |     if !res.is_none() {}
79    |        ^^^^^^^^^^^^^^ help: try: `res.is_some()`
80
81 error: aborting due to 13 previous errors
82