rust/src/test/ui/issues/issue-52049.rs
2018-12-25 21:08:33 -07:00

9 lines
162 B
Rust

fn foo(_: &'static u32) {}
fn unpromotable<T>(t: T) -> T { t }
fn main() {
foo(&unpromotable(5u32));
}
//~^^ ERROR borrowed value does not live long enough