Open
Description
It seems to me that both S1
and S2
should compile:
#![feature(trait_alias)]
// Works
struct S1<'a, T: 'a, I: Iterator<Item = &'a T> + Clone> {
field: I,
}
trait SpecialIterator<'a, T: 'a> = Iterator<Item = &'a T> + Clone;
// Doesn't work
struct S2<'a, T: 'a, I: SpecialIterator<'a, T>> {
field: I,
}
Playground. On 1.46.0-nightly (2020-07-05 2753fab7ce3647033146)
.