]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-in-irrefut-pat.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / 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() {}