error[E0005]: refutable pattern in local binding: `Bar` not covered
--> $DIR/issue-31561.rs:8:9
|
-LL | let Thing::Foo(y) = Thing::Foo(1);
- | ^^^^^^^^^^^^^ pattern `Bar` not covered
+LL | / enum Thing {
+LL | | Foo(u8),
+LL | | Bar,
+LL | | Baz
+LL | | }
+ | |_- `Thing` defined here
+...
+LL | let Thing::Foo(y) = Thing::Foo(1);
+ | ^^^^^^^^^^^^^ pattern `Bar` not covered
error: aborting due to previous error