Hint for a lifetime binding of a type in a trait suggests invalid syntax [E0309] #26271
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hint in the error message for this code appears to suggest a syntax that doesn't compile (playpen):
When I did what (I thought was) suggested (since the same syntax worked in simpler cases):
it failed with a very unfriendly syntax error:
After a lot of head scratching I've discovered that it meant:
So I suggest either:
where
keyword when necessarywhere
:<'a, Item: Tr, <Item as Tr>::TrSubtype: 'a>>
<
is found instead of an ident and emit error along lines of "Move that to thewhere
clause".The text was updated successfully, but these errors were encountered: