]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-in-irrefut-pat.rs
Merge commit '23d11428de3e973b34a5090a78d62887f821c90e' into clippyup
[rust.git] / src / test / ui / borrowck / borrowck-move-in-irrefut-pat.rs
1 fn with<F>(f: F) where F: FnOnce(&String) {}
2
3 fn arg_item(&_x: &String) {}
4     //~^ ERROR [E0507]
5
6 fn arg_closure() {
7     with(|&_x| ())
8     //~^ ERROR [E0507]
9 }
10
11 fn let_pat() {
12     let &_x = &"hi".to_string();
13     //~^ ERROR [E0507]
14 }
15
16 pub fn main() {}