rust/tests/ui/generic-const-items/unsatisfied-outlives-bounds.rs

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

18 lines
428 B
Rust
Raw Normal View History

2023-07-09 20:10:03 -05:00
#![feature(generic_const_items)]
#![allow(incomplete_features)]
// Ensure that we check if outlives-bounds on const items hold or not.
const C<'a, T: 'a>: () = ();
const K<'a, 'b: 'a>: () = ();
fn parametrized0<'any>() {
let () = C::<'static, &'any ()>; //~ ERROR lifetime may not live long enough
}
fn parametrized1<'any>() {
let () = K::<'static, 'any>; //~ ERROR lifetime may not live long enough
}
fn main() {}