2023-07-17 08:19:29 +00:00
|
|
|
error: this `let...else` may be rewritten with the `?` operator
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_let_else_question_mark.rs:29:5
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | let Some(v) = g() else { return None };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let v = g()?;`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::question-mark` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
error: this `let...else` may be rewritten with the `?` operator
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_let_else_question_mark.rs:35:5
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | let Some((v, w)) = g() else { return None };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let (v, w) = g()?;`
|
|
|
|
|
|
|
|
error: this block may be rewritten with the `?` operator
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_let_else_question_mark.rs:38:13
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | let v = if let Some(v_some) = g() { v_some } else { return None };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `g()?`
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_let_else_question_mark.rs:42:5
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | / let v = if let Some(v_some) = g() {
|
|
|
|
LL | | v_some
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return Some(());
|
|
|
|
LL | | };
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-let-else` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_let_else)]`
|
2023-07-17 08:19:29 +00:00
|
|
|
help: consider writing
|
|
|
|
|
|
|
|
|
LL ~ let Some(v) = g() else {
|
|
|
|
LL + return Some(());
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_let_else_question_mark.rs:53:9
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | / let v = match g() {
|
|
|
|
LL | | Some(v_some) => v_some,
|
|
|
|
LL | | _ => return None,
|
|
|
|
LL | | };
|
|
|
|
| |__________^ help: consider writing: `let Some(v) = g() else { return None };`
|
|
|
|
|
|
|
|
error: this could be rewritten as `let...else`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_let_else_question_mark.rs:63:9
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | let v = if let Some(v_some) = g() { v_some } else { return None };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Some(v) = g() else { return None };`
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|