]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-in-irrefut-pat.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[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() {}