@@ -7,55 +7,55 @@ LL | if f != None { "yay" } else { "nay" }
7
7
= note: `-D clippy::partialeq-to-none` implied by `-D warnings`
8
8
9
9
error: binary comparison to literal `Option::None`
10
- --> $DIR/partialeq_to_none.rs:32 :13
10
+ --> $DIR/partialeq_to_none.rs:44 :13
11
11
|
12
12
LL | let _ = x == None;
13
13
| ^^^^^^^^^ help: use `Option::is_none()` instead: `x.is_none()`
14
14
15
15
error: binary comparison to literal `Option::None`
16
- --> $DIR/partialeq_to_none.rs:33 :13
16
+ --> $DIR/partialeq_to_none.rs:45 :13
17
17
|
18
18
LL | let _ = x != None;
19
19
| ^^^^^^^^^ help: use `Option::is_some()` instead: `x.is_some()`
20
20
21
21
error: binary comparison to literal `Option::None`
22
- --> $DIR/partialeq_to_none.rs:34 :13
22
+ --> $DIR/partialeq_to_none.rs:46 :13
23
23
|
24
24
LL | let _ = None == x;
25
25
| ^^^^^^^^^ help: use `Option::is_none()` instead: `x.is_none()`
26
26
27
27
error: binary comparison to literal `Option::None`
28
- --> $DIR/partialeq_to_none.rs:35 :13
28
+ --> $DIR/partialeq_to_none.rs:47 :13
29
29
|
30
30
LL | let _ = None != x;
31
31
| ^^^^^^^^^ help: use `Option::is_some()` instead: `x.is_some()`
32
32
33
33
error: binary comparison to literal `Option::None`
34
- --> $DIR/partialeq_to_none.rs:37 :8
34
+ --> $DIR/partialeq_to_none.rs:49 :8
35
35
|
36
36
LL | if foobar() == None {}
37
37
| ^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `foobar().is_none()`
38
38
39
39
error: binary comparison to literal `Option::None`
40
- --> $DIR/partialeq_to_none.rs:39 :8
40
+ --> $DIR/partialeq_to_none.rs:51 :8
41
41
|
42
42
LL | if bar().ok() != None {}
43
43
| ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `bar().ok().is_some()`
44
44
45
45
error: binary comparison to literal `Option::None`
46
- --> $DIR/partialeq_to_none.rs:41 :13
46
+ --> $DIR/partialeq_to_none.rs:53 :13
47
47
|
48
48
LL | let _ = Some(1 + 2) != None;
49
49
| ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `Some(1 + 2).is_some()`
50
50
51
51
error: binary comparison to literal `Option::None`
52
- --> $DIR/partialeq_to_none.rs:43 :13
52
+ --> $DIR/partialeq_to_none.rs:55 :13
53
53
|
54
54
LL | let _ = { Some(0) } == None;
55
55
| ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `{ Some(0) }.is_none()`
56
56
57
57
error: binary comparison to literal `Option::None`
58
- --> $DIR/partialeq_to_none.rs:45 :13
58
+ --> $DIR/partialeq_to_none.rs:57 :13
59
59
|
60
60
LL | let _ = {
61
61
| _____________^
@@ -77,31 +77,31 @@ LL ~ }.is_some();
77
77
|
78
78
79
79
error: binary comparison to literal `Option::None`
80
- --> $DIR/partialeq_to_none.rs:55 :13
80
+ --> $DIR/partialeq_to_none.rs:67 :13
81
81
|
82
82
LL | let _ = optref() == &&None;
83
83
| ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `optref().is_none()`
84
84
85
85
error: binary comparison to literal `Option::None`
86
- --> $DIR/partialeq_to_none.rs:56 :13
86
+ --> $DIR/partialeq_to_none.rs:68 :13
87
87
|
88
88
LL | let _ = &&None != optref();
89
89
| ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `optref().is_some()`
90
90
91
91
error: binary comparison to literal `Option::None`
92
- --> $DIR/partialeq_to_none.rs:57 :13
92
+ --> $DIR/partialeq_to_none.rs:69 :13
93
93
|
94
94
LL | let _ = **optref() == None;
95
95
| ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `optref().is_none()`
96
96
97
97
error: binary comparison to literal `Option::None`
98
- --> $DIR/partialeq_to_none.rs:58 :13
98
+ --> $DIR/partialeq_to_none.rs:70 :13
99
99
|
100
100
LL | let _ = &None != *optref();
101
101
| ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `optref().is_some()`
102
102
103
103
error: binary comparison to literal `Option::None`
104
- --> $DIR/partialeq_to_none.rs:61 :13
104
+ --> $DIR/partialeq_to_none.rs:73 :13
105
105
|
106
106
LL | let _ = None != *x;
107
107
| ^^^^^^^^^^ help: use `Option::is_some()` instead: `(*x).is_some()`
0 commit comments