rust/tests/ui/impl-trait/rpit/early_bound.rs

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

14 lines
354 B
Rust
Raw Normal View History

2024-01-09 14:12:59 +00:00
use std::convert::identity;
fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
//~^ ERROR concrete type differs from previous defining opaque type use
let true = n else { loop {} };
let _ = || {
let _ = identity::<&'a ()>(test(false));
2024-03-18 16:03:18 +00:00
//~^ ERROR expected generic lifetime parameter, found `'_`
2024-01-09 14:12:59 +00:00
};
loop {}
}
fn main() {}