Somewhat confusing error with extended_key_value_attributes
#85066
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
F-extended_key_value_attributes
`#![feature(extended_key_value_attributes)]
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Note that
../README.md
must not exist in order to reproduce this error:Playground
Output
The first error is what I would expect, but the second is a bit confusing and weird:
Perhaps instead of emitting
unexpected token: `(/*ERROR*/)`
when an error token is encountered, we could use adelay_span_bug
since an error should have already occurred.If for some reason an error had not already been emitted, the compiler would crash; otherwise, it would just show the original error.
Originally posted by @camelid in #83366 (comment)
The text was updated successfully, but these errors were encountered: