2013-01-24 19:33:48 -08:00
|
|
|
fn a() {
|
2016-10-29 22:54:04 +01:00
|
|
|
let mut v = vec![1, 2, 3];
|
2015-02-01 21:53:25 -05:00
|
|
|
let vb: &mut [isize] = &mut v;
|
2014-02-13 09:46:46 -08:00
|
|
|
match vb {
|
2019-07-08 01:47:46 +02:00
|
|
|
&mut [_a, ref tail @ ..] => {
|
2013-03-15 15:24:24 -04:00
|
|
|
v.push(tail[0] + tail[1]); //~ ERROR cannot borrow
|
2013-01-24 19:33:48 -08:00
|
|
|
}
|
|
|
|
_ => {}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|