rust/tests/ui/impl-trait/defining-use-uncaptured-non-universal-region.rs
2024-03-26 09:26:23 +00:00

17 lines
251 B
Rust

// issue: #111906
//@ check-pass
#![allow(unconditional_recursion)]
fn foo<'a: 'a>() -> impl Sized {
let _: () = foo::<'a>();
loop {}
}
fn bar<'a: 'a>() -> impl Sized + 'a {
let _: *mut &'a () = bar::<'a>();
loop {}
}
fn main() {}