summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/issue-46471.rs
blob: 8922005d2f82c6c154efb001f187e65519618cf0 (plain)
1
2
3
4
5
6
7
fn foo() -> &'static u32 {
    let x = 0;
    &x
    //~^ ERROR cannot return reference to local variable `x` [E0515]
}

fn main() { }