1 error: question mark operator is useless here
2 --> $DIR/needless_question_mark.rs:23:12
4 LL | return Some(to.magic?);
5 | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
7 = note: `-D clippy::needless-question-mark` implied by `-D warnings`
9 error: question mark operator is useless here
10 --> $DIR/needless_question_mark.rs:31:12
12 LL | return Some(to.magic?)
13 | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
15 error: question mark operator is useless here
16 --> $DIR/needless_question_mark.rs:36:5
19 | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
21 error: question mark operator is useless here
22 --> $DIR/needless_question_mark.rs:41:21
24 LL | to.and_then(|t| Some(t.magic?))
25 | ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`
27 error: question mark operator is useless here
28 --> $DIR/needless_question_mark.rs:50:9
31 | ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`
33 error: question mark operator is useless here
34 --> $DIR/needless_question_mark.rs:55:12
36 LL | return Ok(tr.magic?);
37 | ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`
39 error: question mark operator is useless here
40 --> $DIR/needless_question_mark.rs:62:12
42 LL | return Ok(tr.magic?)
43 | ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`
45 error: question mark operator is useless here
46 --> $DIR/needless_question_mark.rs:66:5
49 | ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`
51 error: question mark operator is useless here
52 --> $DIR/needless_question_mark.rs:70:21
54 LL | tr.and_then(|t| Ok(t.magic?))
55 | ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
57 error: question mark operator is useless here
58 --> $DIR/needless_question_mark.rs:78:9
61 | ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
63 error: question mark operator is useless here
64 --> $DIR/needless_question_mark.rs:85:16
66 LL | return Ok(t.magic?);
67 | ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
69 error: question mark operator is useless here
70 --> $DIR/needless_question_mark.rs:120:27
72 LL | || -> Option<_> { Some(Some($expr)?) }()
73 | ^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `Some($expr)`
75 LL | let _x = some_and_qmark_in_macro!(x?);
76 | ---------------------------- in this macro invocation
78 = note: this error originates in the macro `some_and_qmark_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
80 error: question mark operator is useless here
81 --> $DIR/needless_question_mark.rs:131:5
84 | ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
86 error: question mark operator is useless here
87 --> $DIR/needless_question_mark.rs:139:5
90 | ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `s.magic`
92 error: aborting due to 14 previous errors