1
Fork 0
rust/tests/ui/inline-const/using-late-bound-from-closure.rs
2025-04-08 23:06:31 +03:00

16 lines
379 B
Rust

// 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;
//~^ ERROR `awd` does not live long enough
};
b
};
}
fn main() {}