bizarre error message for one of the universal constructor syntaxes #108224
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: it compiles.
Instead, this happened (on the playground, with stable and with nightly):
It's not 100% clear to me that this syntax, with the generics applied to the enum type rather than the variant, is intended to be accepted. I think it probably ought to be, though. On this point I found #69363/#69356. The Reference doesn't seem to discuss it.
Also, the error messages are nonsensical, and the suggestion doesn't compile.
Variations:
The text was updated successfully, but these errors were encountered: