summary refs log tree commit diff
path: root/src/test/ui/issues/issue-46472.rs
blob: 88f97e99aeaffc2bc885dd42bf906a3dc6c2d927 (plain)
1
2
3
4
5
6
7
8
9
// compile-flags: -Z borrowck=compare

fn bar<'a>() -> &'a mut u32 {
    &mut 4
    //~^ ERROR borrowed value does not live long enough (Ast) [E0597]
    //~| ERROR cannot return reference to temporary value (Mir) [E0515]
}

fn main() { }