Attempt to set a default value for a lifetime generic parameter produces confusing diagnostic #107492
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
Current output
Desired output
Rationale and extra context
AFAIK, lifetime generic parameters are not currently allowed to have default values. Attempting to use the "obvious" syntax for setting a default lifetime is an opportunity to teach the user that this is not a supported feature, and certainly shouldn't claim that there's an unmatched angle bracket just because it didn't expect the
=
during parsing.This is happening on
rustc 1.69.0-nightly (d7948c843 2023-01-26)
with the 2021 edition.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: