| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:14:12 | |
| | | |
| LL | return Some(to.magic?); | |
| | ^^^^^^^^^^^^^^^ | |
| | | |
| = note: `-D clippy::needless-question-mark` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]` | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - return Some(to.magic?); | |
| LL + return to.magic; | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:23:12 | |
| | | |
| LL | return Some(to.magic?) | |
| | ^^^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - return Some(to.magic?) | |
| LL + return to.magic | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:29:5 | |
| | | |
| LL | Some(to.magic?) | |
| | ^^^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - Some(to.magic?) | |
| LL + to.magic | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:35:21 | |
| | | |
| LL | to.and_then(|t| Some(t.magic?)) | |
| | ^^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - to.and_then(|t| Some(t.magic?)) | |
| LL + to.and_then(|t| t.magic) | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:45:9 | |
| | | |
| LL | Some(t.magic?) | |
| | ^^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - Some(t.magic?) | |
| LL + t.magic | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:51:12 | |
| | | |
| LL | return Ok(tr.magic?); | |
| | ^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - return Ok(tr.magic?); | |
| LL + return tr.magic; | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:59:12 | |
| | | |
| LL | return Ok(tr.magic?) | |
| | ^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - return Ok(tr.magic?) | |
| LL + return tr.magic | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:64:5 | |
| | | |
| LL | Ok(tr.magic?) | |
| | ^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - Ok(tr.magic?) | |
| LL + tr.magic | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:69:21 | |
| | | |
| LL | tr.and_then(|t| Ok(t.magic?)) | |
| | ^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - tr.and_then(|t| Ok(t.magic?)) | |
| LL + tr.and_then(|t| t.magic) | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:78:9 | |
| | | |
| LL | Ok(t.magic?) | |
| | ^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - Ok(t.magic?) | |
| LL + t.magic | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:86:16 | |
| | | |
| LL | return Ok(t.magic?); | |
| | ^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - return Ok(t.magic?); | |
| LL + return t.magic; | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:122:27 | |
| | | |
| LL | macro_rules! some_and_qmark_in_macro { | |
| LL | ($expr:expr) => { | |
| LL | || -> Option<_> { Some(Some($expr)?) }() | |
| | ^^^^^^^^^^^^^^^^^^ | |
| ... | |
| LL | let _x = some_and_qmark_in_macro!(x?); | |
| | ---------------------------- in this macro invocation | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - || -> Option<_> { Some(Some($expr)?) }() | |
| LL + || -> Option<_> { Some($expr) }() | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:134:5 | |
| | | |
| LL | Some(to.magic?) | |
| | ^^^^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - Some(to.magic?) | |
| LL + to.magic | |
| | | |
| error: enclosing `Ok` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:143:5 | |
| | | |
| LL | Ok(s.magic?) | |
| | ^^^^^^^^^^^^ | |
| | | |
| help: remove the enclosing `Ok` and `?` operator | |
| | | |
| LL - Ok(s.magic?) | |
| LL + s.magic | |
| | | |
| error: enclosing `Some` and `?` operator are unneeded | |
| --> tests/ui/needless_question_mark.rs:148:7 | |
| | | |
| LL | { Some(a?) } | |
| | ^^^^^^^^ | |
| | | |
| help: remove the enclosing `Some` and `?` operator | |
| | | |
| LL - { Some(a?) } | |
| LL + { a } | |
| | | |
| error: aborting due to 15 previous errors | |