@@ -25,7 +25,7 @@ LL | / let v = match h() {
2525LL | | (Some(_), Some(_)) | (None, None) => continue,
2626LL | | (Some(v), None) | (None, Some(v)) => v,
2727LL | | };
28- | |__________^ help: consider writing: `let (Some(v), None) | (None, Some(v)) = h() else { continue };`
28+ | |__________^ help: consider writing: `let (( Some(v), None) | (None, Some(v) )) = h() else { continue };`
2929
3030error: this could be rewritten as `let...else`
3131 --> $DIR/manual_let_else_match.rs:49:9
@@ -34,7 +34,7 @@ LL | / let v = match build_enum() {
3434LL | | _ => continue,
3535LL | | Variant::Bar(v) | Variant::Baz(v) => v,
3636LL | | };
37- | |__________^ help: consider writing: `let Variant::Bar(v) | Variant::Baz(v) = build_enum() else { continue };`
37+ | |__________^ help: consider writing: `let ( Variant::Bar(v) | Variant::Baz(v) ) = build_enum() else { continue };`
3838
3939error: this could be rewritten as `let...else`
4040 --> $DIR/manual_let_else_match.rs:57:5
@@ -54,5 +54,14 @@ LL | | Err(()) => return,
5454LL | | };
5555 | |______^ help: consider writing: `let Ok(v) = f().map_err(|_| ()) else { return };`
5656
57- error: aborting due to 6 previous errors
57+ error: this could be rewritten as `let...else`
58+ --> $DIR/manual_let_else_match.rs:70:5
59+ |
60+ LL | / let _value = match f {
61+ LL | | Variant::Bar(_) | Variant::Baz(_) => (),
62+ LL | | _ => return,
63+ LL | | };
64+ | |______^ help: consider writing: `let (Variant::Bar(_) | Variant::Baz(_)) = f else { return };`
65+
66+ error: aborting due to 7 previous errors
5867
0 commit comments