about summary refs log tree commit diff
path: root/tests/ui/consts/escaping-bound-var.rs
blob: a538d607d6ca5fdd0987046c88c17e0894359b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete

fn test<'a>(
    _: &'a (),
) -> [(); { //~ ERROR: mismatched types
    let x: &'a ();
    //~^ ERROR cannot capture late-bound lifetime in constant
    1
}] {
}

fn main() {}