summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-52049.rs
blob: efdcc44930567ca992b6afeb5259200da3b3be01 (plain)
1
2
3
4
5
6
7
8
fn foo(_: &'static u32) {}

fn unpromotable<T>(t: T) -> T { t }

fn main() {
    foo(&unpromotable(5u32));
}
//~^^ ERROR temporary value dropped while borrowed