rust/tests/ui/inline-const/using-late-bound-from-closure.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
373 B
Rust
Raw Normal View History

2024-08-04 09:11:43 -05:00
// 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() {}