I was trying to write a function that had the following signature:
pub async fn join_all_or_first_error<T, E, I>(i: I) -> Result<Vec<T>, E>
where
I: IntoIterator,
<I as IntoIterator>::Item: Future,
<<I as IntoIterator>::Item as Future>::Output: Result<T, E> { ... }
But the error expected trait, found enum "Result"
was produced by rustc.
Is there a specific reason why rust doesn't allow this?