summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.rs
blob: f4f402dd96ab636ec8c1755620b924c3b344e8f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn with<F>(f: F) where F: FnOnce(&String) {}

fn arg_item(&_x: &String) {}
    //~^ ERROR [E0507]

fn arg_closure() {
    with(|&_x| ())
    //~^ ERROR [E0507]
}

fn let_pat() {
    let &_x = &"hi".to_string();
    //~^ ERROR [E0507]
}

pub fn main() {}