Closed
Description
error[E0404]: expected trait, found enum `std::result::Result`
--> src/imessage/db.rs:216:44
|
216 | fn unwrap_iter<'a,T,E>(iter: Iterator<Item=std::result::Result<T,E> + 'a>) -> Result<Vec<T>>
| ^^^^^^^^^^^^^^^^^^^^^^^^ not a trait
In the code fragment above, the problem is not that Item
needs to point to a trait (is that even acceptable?) but rather that + 'a
can only come after a trait.
Ideally, this should actually be a different error ("lifetime specification here is not valid" or something along those lines) with the source of the error being the presence of 'a
and not the definition of Item
, but if it remains E0404 then at least a hint should be provided along the lines of
+ 'a
can only follow a trait, butstd::result::Result<...>
is a type
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Trait systemCategory: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Diagnostics: An error or lint that needs small tweaks.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Relevant to the compiler team, which will review and decide on the PR/issue.