]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/issue-99387.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / issue-99387.rs
1 // check-pass
2
3 #![feature(type_alias_impl_trait)]
4 #![allow(private_in_public)]
5
6 pub type Successors<'a> = impl Iterator<Item = &'a ()>;
7
8 pub fn f<'a>() -> Successors<'a> {
9     None.into_iter()
10 }
11
12 trait Tr {
13     type Item;
14 }
15
16 impl<'a> Tr for &'a () {
17     type Item = Successors<'a>;
18 }
19
20 pub fn ohno<'a>() -> <&'a () as Tr>::Item {
21     None.into_iter()
22 }
23
24 fn main() {}