You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried this code to test error code E0004(Matching Error) on godbolt:
#![allow(unused)]fnmain(){enumTerminator{HastaLaVistaBaby,TalkToMyHand,}let x = Terminator::HastaLaVistaBaby;match x {// error: non-exhaustive patterns: `HastaLaVistaBaby` not coveredTerminator::TalkToMyHand => {}}}
I expected to see this happen:
error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered
--><source>:10:7
|
3 | / enum Terminator {
4 || HastaLaVistaBaby,
|| ---------------- not covered
5 || TalkToMyHand,
6 || }
||_- `Terminator` defined here
...
10 | match x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered
| ^ pattern `HastaLaVistaBaby` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type`Terminator`
Instead, this happened:
Compiler returned: 0
Meta
What version of Rust GCC were you using, git sha 6c63150
I tried this code to test error code E0004(Matching Error) on godbolt:
I expected to see this happen:
Instead, this happened:
Meta
The text was updated successfully, but these errors were encountered: