]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/access-mode-in-closures.rs
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[rust.git] / src / test / ui / borrowck / access-mode-in-closures.rs
1 struct S(Vec<isize>);
2
3 fn unpack<F>(_unpack: F) where F: FnOnce(&S) -> Vec<isize> {}
4
5 fn main() {
6     let _foo = unpack(|s| {
7         // Test that `s` is moved here.
8         match *s { S(v) => v } //~ ERROR cannot move out
9     });
10 }