rust/tests/ui/issues/issue-52049.rs

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

9 lines
160 B
Rust
Raw Normal View History

2018-07-07 05:21:50 -05:00
fn foo(_: &'static u32) {}
fn unpromotable<T>(t: T) -> T { t }
fn main() {
foo(&unpromotable(5u32));
}
//~^^ ERROR temporary value dropped while borrowed