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
The type parameter should be a self-contained type, I'm not sure why it's asking for a lifetime specifier.
New description
The error message above seems to be contradictory, since the <'a> thing is a lifetime itself, however, the problem is the environment of the closure needs a lifetime, which is written like ||:'a. It would be nice for the error message to guide people towards the correct thing.
The text was updated successfully, but these errors were encountered:
The <'a> is the lifetimes of any parameters, the lifetime of the environment is specified by ||:'a.
I'll co-opt this issue for improving the error message, since it's very confusing.
huonw
changed the title
missing lifetime specifier when none is needed
Confusing error for missing lifetime on a closure written as <'a> |...|May 11, 2014
Formerly:
missing lifetime specifier when none is needed
The type parameter should be a self-contained type, I'm not sure why it's asking for a lifetime specifier.
New description
The error message above seems to be contradictory, since the
<'a>
thing is a lifetime itself, however, the problem is the environment of the closure needs a lifetime, which is written like||:'a
. It would be nice for the error message to guide people towards the correct thing.The text was updated successfully, but these errors were encountered: