You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hint for a lifetime binding of a type in a trait suggests invalid syntax [E0309] #26271
error: the associated type <Item as Tr>::TrSubtype may not live long enough
[…] consider adding an explicit lifetime bound <Item as Tr>::TrSubtype: 'a...
When I did what (I thought was) suggested (since the same syntax worked in simpler cases):
structBar<'a,Item:Tr, <Item as Tr>::TrSubtype:'a> {
it failed with a very unfriendly syntax error:
error: expected ident, found <
After a lot of head scratching I've discovered that it meant:
Activity
Anachron commentedon Jun 14, 2015
I would give 👍 to the last one.
steveklabnik commentedon Jan 3, 2017
Triage: same error as today.
estebank commentedon Sep 19, 2018
Funnily enough, this code now works in the latest beta.
Do not close: we still want to change the parser to accept
struct Bar<'a, Item: Tr, <Item as Tr>::TrSubtype: 'a> {and emit a tailored diagnostic.Rollup merge of rust-lang#64676 - estebank:assoc-type-bound-in-generi…
Rollup merge of rust-lang#64676 - estebank:assoc-type-bound-in-generi…