rust/tests/ui/impl-trait/defining-use-uncaptured-non-universal-region.rs

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

17 lines
251 B
Rust
Raw Normal View History

// 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() {}