Unable to match non_exhaustive enum tuple variants with rest pattern #130891
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Tuple enum variants
Tuple(i32)
from external crates marked with#[non_exhaustive]
should be able to be matched by the RestPatternTuple(val, ..)
. But it fails to compile.I tried this code:
I expected to see this happen: No compile error.
Instead, this happened:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: