2023-09-25 09:28:58 +00:00
|
|
|
error: this could be rewritten as `let...else`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui-toml/manual_let_else/manual_let_else.rs:9:5
|
2023-09-25 09:28:58 +00:00
|
|
|
|
|
|
|
|
LL | / let x = match Foo::A(1) {
|
|
|
|
LL | |
|
|
|
|
LL | | Foo::A(x) => x,
|
|
|
|
LL | | Foo::B => return,
|
|
|
|
LL | | };
|
|
|
|
| |______^ help: consider writing: `let Foo::A(x) = Foo::A(1) else { return };`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-let-else` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_let_else)]`
|
|
|
|
|
2023-11-21 17:08:42 +00:00
|
|
|
error: aborting due to 1 previous error
|
2023-09-25 09:28:58 +00:00
|
|
|
|