@@ -2,75 +2,75 @@ error: question mark operator is useless here
2
2
--> $DIR/needless_question_mark.rs:23:12
3
3
|
4
4
LL | return Some(to.magic?);
5
- | ^^^^^^^^^^^^^^^ help: try: `to.magic`
5
+ | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()` : `to.magic`
6
6
|
7
7
= note: `-D clippy::needless-question-mark` implied by `-D warnings`
8
8
9
9
error: question mark operator is useless here
10
10
--> $DIR/needless_question_mark.rs:31:12
11
11
|
12
12
LL | return Some(to.magic?)
13
- | ^^^^^^^^^^^^^^^ help: try: `to.magic`
13
+ | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()` : `to.magic`
14
14
15
15
error: question mark operator is useless here
16
16
--> $DIR/needless_question_mark.rs:36:5
17
17
|
18
18
LL | Some(to.magic?)
19
- | ^^^^^^^^^^^^^^^ help: try: `to.magic`
19
+ | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()` : `to.magic`
20
20
21
21
error: question mark operator is useless here
22
22
--> $DIR/needless_question_mark.rs:41:21
23
23
|
24
24
LL | to.and_then(|t| Some(t.magic?))
25
- | ^^^^^^^^^^^^^^ help: try: `t.magic`
25
+ | ^^^^^^^^^^^^^^ help: try removing question mark and `Some()` : `t.magic`
26
26
27
27
error: question mark operator is useless here
28
28
--> $DIR/needless_question_mark.rs:50:9
29
29
|
30
30
LL | Some(t.magic?)
31
- | ^^^^^^^^^^^^^^ help: try: `t.magic`
31
+ | ^^^^^^^^^^^^^^ help: try removing question mark and `Some()` : `t.magic`
32
32
33
33
error: question mark operator is useless here
34
34
--> $DIR/needless_question_mark.rs:55:12
35
35
|
36
36
LL | return Ok(tr.magic?);
37
- | ^^^^^^^^^^^^^ help: try: `tr.magic`
37
+ | ^^^^^^^^^^^^^ help: try removing question mark and `Ok()` : `tr.magic`
38
38
39
39
error: question mark operator is useless here
40
40
--> $DIR/needless_question_mark.rs:62:12
41
41
|
42
42
LL | return Ok(tr.magic?)
43
- | ^^^^^^^^^^^^^ help: try: `tr.magic`
43
+ | ^^^^^^^^^^^^^ help: try removing question mark and `Ok()` : `tr.magic`
44
44
45
45
error: question mark operator is useless here
46
46
--> $DIR/needless_question_mark.rs:66:5
47
47
|
48
48
LL | Ok(tr.magic?)
49
- | ^^^^^^^^^^^^^ help: try: `tr.magic`
49
+ | ^^^^^^^^^^^^^ help: try removing question mark and `Ok()` : `tr.magic`
50
50
51
51
error: question mark operator is useless here
52
52
--> $DIR/needless_question_mark.rs:70:21
53
53
|
54
54
LL | tr.and_then(|t| Ok(t.magic?))
55
- | ^^^^^^^^^^^^ help: try: `t.magic`
55
+ | ^^^^^^^^^^^^ help: try removing question mark and `Ok()` : `t.magic`
56
56
57
57
error: question mark operator is useless here
58
58
--> $DIR/needless_question_mark.rs:78:9
59
59
|
60
60
LL | Ok(t.magic?)
61
- | ^^^^^^^^^^^^ help: try: `t.magic`
61
+ | ^^^^^^^^^^^^ help: try removing question mark and `Ok()` : `t.magic`
62
62
63
63
error: question mark operator is useless here
64
64
--> $DIR/needless_question_mark.rs:85:16
65
65
|
66
66
LL | return Ok(t.magic?);
67
- | ^^^^^^^^^^^^ help: try: `t.magic`
67
+ | ^^^^^^^^^^^^ help: try removing question mark and `Ok()` : `t.magic`
68
68
69
69
error: question mark operator is useless here
70
70
--> $DIR/needless_question_mark.rs:120:27
71
71
|
72
72
LL | || -> Option<_> { Some(Some($expr)?) }()
73
- | ^^^^^^^^^^^^^^^^^^ help: try: `Some($expr)`
73
+ | ^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()` : `Some($expr)`
74
74
...
75
75
LL | let _x = some_and_qmark_in_macro!(x?);
76
76
| ---------------------------- in this macro invocation
0 commit comments