about summary refs log tree commit diff
path: root/tests/ui/inline-const/using-late-bound-from-closure.rs
blob: 2b12b2e26a2266d5d7a118df60b6250d9e226794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Test for ICE: cannot convert ReLateParam to a region vid
// https://github.com/rust-lang/rust/issues/125873

#![feature(closure_lifetime_binder)]
fn foo() {
    let a = for<'a> |b: &'a ()| -> &'a () {
        const {
            let awd = ();
            let _: &'a () = &awd;
            //~^ `awd` does not live long enough
        };
        b
    };
}

fn main() {}