Inconsistency between tuples and struct-tuples with min-exhaustive-patterns
#129043
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-discussion
Category: Discussion or questions that doesn't represent real issues.
F-min_exhaustive_patterns
`#![feature(min_exhaustive_patterns)]`
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.
I tried this code:
I expected to see this happen: No errors (because
Bar<B>
is empty the same wayfoo
's parameter is).Instead, this happened:
non-exhaustive patterns: type Bar<B> is non-empty
.Note that the tracking issue #119612 mentions "a struct with a visible field of empty type", so I also tried to make the first field
pub !
to see, but it's the same behavior. Note that I consider the field visible in the scope it is used, which matches with the fact that addingpub
did not fix the issue. The issue seems thus to be a difference between struct-tuple and tuple.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: