rust/tests/ui/static/static-lifetime-bound.rs

7 lines
109 B
Rust

fn f<'a: 'static>(_: &'a i32) {}
fn main() {
let x = 0;
f(&x); //~ERROR does not live long enough
}