blob: 111ae849c0f6a2d3189cbe29e0af9e3daf7fcf7a [file] [log] [blame]
#![feature(explicit_tail_calls)]
#![expect(incomplete_features)]
fn link(x: &str) -> &'static str {
become passthrough(x);
//~^ ERROR lifetime may not live long enough
}
fn passthrough<T>(t: T) -> T { t }
fn main() {
let x = String::from("hello, world");
let s = link(&x);
drop(x);
println!("{s}");
}