summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/late-bound-vars/in_closure.rs
blob: 5294cc3b5f42e1eca8917da1d8a6873367214885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

const fn inner<'a>() -> usize where &'a (): Sized {
    3
}

fn test<'a>() {
    let _ = || {
        let _: [u8; inner::<'a>()];
        let _ = [0; inner::<'a>()];
    };
}

fn main() {
    test();
}