summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/nested_in_closure.rs
blob: 362f3d53e88bfd7bbd975ef4ad8a0b3b2476aeab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(type_alias_impl_trait)]
// check-pass

fn main() {
    let x = || {
        type Tait = impl Sized;
        let y: Tait = ();
    };

    let y = || {
        type Tait = impl std::fmt::Debug;
        let y: Tait = ();
        y
    };
    let mut z = y();
    z = ();
}