summary refs log tree commit diff
path: root/tests/ui/impl-trait/issues/issue-77987.rs
blob: a7e7b067d5ff8d411228f88b1dd63461e996711d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#![feature(type_alias_impl_trait)]

//@ check-pass

pub trait Foo<T> {}
impl<T, U> Foo<T> for U {}

mod scope {
    pub type Scope = impl super::Foo<()>;

    #[allow(unused)]
    fn infer_scope() -> Scope {
        ()
    }
}

#[allow(unused)]
fn ice() -> impl Foo<scope::Scope> {
    loop {}
}

fn main() {}