fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
857 B25 linesraw
1error[E0005]: refutable pattern in local binding: `Bar` and `Baz` not covered
2  --> $DIR/issue-31561.rs:8:9
3   |
4LL | / enum Thing {
5LL | |     Foo(u8),
6LL | |     Bar,
7   | |     --- not covered
8LL | |     Baz
9   | |     --- not covered
10LL | | }
11   | |_- `Thing` defined here
12...
13LL |       let Thing::Foo(y) = Thing::Foo(1);
14   |           ^^^^^^^^^^^^^ patterns `Bar` and `Baz` not covered
15   |
16   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
17   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
18help: you might want to use `if let` to ignore the variant that isn't matched
19   |
20LL |     if let Thing::Foo(y) = Thing::Foo(1) { /* */ }
21   |
22
23error: aborting due to previous error
24
25For more information about this error, try `rustc --explain E0005`.