Add test for #70121

This commit is contained in:
Yuki Okushi 2020-05-25 22:29:34 +09:00
parent 125f0abb42
commit 4b87f97ca8
No known key found for this signature in database
GPG key ID: B0986C85C0E2DAA1

View file

@ -0,0 +1,23 @@
// check-pass
#![feature(type_alias_impl_trait)]
pub type Successors<'a> = impl Iterator<Item = &'a ()>;
pub fn f<'a>() -> Successors<'a> {
None.into_iter()
}
pub trait Tr {
type Item;
}
impl<'a> Tr for &'a () {
type Item = Successors<'a>;
}
pub fn kazusa<'a>() -> <&'a () as Tr>::Item {
None.into_iter()
}
fn main() {}