Skip to content

Commit

Permalink
Add test for rust-lang#70121
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed May 26, 2020
1 parent 125f0ab commit 4b87f97
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/ui/type-alias-impl-trait/issue-70121.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 4b87f97

Please sign in to comment.