summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/needless_question_mark.stderr
blob: d1f89e326c67c3ab65b1dd7e6f31eb52e0093c01 (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
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
error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:22:12
   |
LL |     return Some(to.magic?);
   |            ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
   |
   = note: `-D clippy::needless-question-mark` implied by `-D warnings`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:30:12
   |
LL |     return Some(to.magic?)
   |            ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:35:5
   |
LL |     Some(to.magic?)
   |     ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:40:21
   |
LL |     to.and_then(|t| Some(t.magic?))
   |                     ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:49:9
   |
LL |         Some(t.magic?)
   |         ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:54:12
   |
LL |     return Ok(tr.magic?);
   |            ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:61:12
   |
LL |     return Ok(tr.magic?)
   |            ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:65:5
   |
LL |     Ok(tr.magic?)
   |     ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:69:21
   |
LL |     tr.and_then(|t| Ok(t.magic?))
   |                     ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:77:9
   |
LL |         Ok(t.magic?)
   |         ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:84:16
   |
LL |         return Ok(t.magic?);
   |                ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:119:27
   |
LL |         || -> Option<_> { Some(Some($expr)?) }()
   |                           ^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `Some($expr)`
...
LL |     let _x = some_and_qmark_in_macro!(x?);
   |              ---------------------------- in this macro invocation
   |
   = note: this error originates in the macro `some_and_qmark_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:130:5
   |
LL |     Some(to.magic?)
   |     ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`

error: question mark operator is useless here
  --> $DIR/needless_question_mark.rs:138:5
   |
LL |     Ok(s.magic?)
   |     ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `s.magic`

error: aborting due to 14 previous errors