2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:20:12
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | return Some(to.magic?);
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-question-mark` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:28:12
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | return Some(to.magic?)
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:33:5
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | Some(to.magic?)
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:38:21
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | to.and_then(|t| Some(t.magic?))
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:47:9
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | Some(t.magic?)
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:52:12
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | return Ok(tr.magic?);
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:59:12
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | return Ok(tr.magic?)
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:63:5
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | Ok(tr.magic?)
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:67:21
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | tr.and_then(|t| Ok(t.magic?))
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:75:9
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | Ok(t.magic?)
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:82:16
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
|
LL | return Ok(t.magic?);
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
|
2021-01-15 09:56:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:117:27
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | || -> Option<_> { Some(Some($expr)?) }()
|
2021-12-06 11:33:31 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `Some($expr)`
|
2021-03-25 18:29:11 +00:00
|
|
|
...
|
|
|
|
LL | let _x = some_and_qmark_in_macro!(x?);
|
|
|
|
| ---------------------------- in this macro invocation
|
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `some_and_qmark_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-03-25 18:29:11 +00:00
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:128:5
|
2022-01-27 14:12:45 +00:00
|
|
|
|
|
|
|
|
LL | Some(to.magic?)
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
|
|
|
|
|
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:136:5
|
2022-01-27 14:12:45 +00:00
|
|
|
|
|
|
|
|
LL | Ok(s.magic?)
|
|
|
|
| ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `s.magic`
|
|
|
|
|
2023-12-25 18:01:56 +00:00
|
|
|
error: question mark operator is useless here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_question_mark.rs:140:7
|
2023-12-25 18:01:56 +00:00
|
|
|
|
|
|
|
|
LL | { Some(a?) }
|
|
|
|
| ^^^^^^^^ help: try removing question mark and `Some()`: `a`
|
|
|
|
|
|
|
|
error: aborting due to 15 previous errors
|
2021-01-15 09:56:44 +00:00
|
|
|
|