@@ -25,7 +25,7 @@ LL | / let v = match h() {
25
25
LL | | (Some(_), Some(_)) | (None, None) => continue,
26
26
LL | | (Some(v), None) | (None, Some(v)) => v,
27
27
LL | | };
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 };`
29
29
30
30
error: this could be rewritten as `let...else`
31
31
--> $DIR/manual_let_else_match.rs:49:9
@@ -34,7 +34,7 @@ LL | / let v = match build_enum() {
34
34
LL | | _ => continue,
35
35
LL | | Variant::Bar(v) | Variant::Baz(v) => v,
36
36
LL | | };
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 };`
38
38
39
39
error: this could be rewritten as `let...else`
40
40
--> $DIR/manual_let_else_match.rs:57:5
@@ -54,5 +54,14 @@ LL | | Err(()) => return,
54
54
LL | | };
55
55
| |______^ help: consider writing: `let Ok(v) = f().map_err(|_| ()) else { return };`
56
56
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
58
67
0 commit comments