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