]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-vec-pattern-move-tail.rs
2 let mut a
= [1, 2, 3, 4];
4 [1, 2, ref tail @
..] => tail
,
7 println
!("t[0]: {}", t
[0]);
8 a
[2] = 0; //~ ERROR cannot assign to `a[_]` because it is borrowed
9 println
!("t[0]: {}", t
[0]);