2015-03-26 20:34:27 -05:00
|
|
|
#![feature(slice_patterns)]
|
|
|
|
|
2013-01-24 21:33:48 -06:00
|
|
|
fn a() {
|
2016-10-29 16:54:04 -05:00
|
|
|
let mut v = vec![1, 2, 3];
|
2015-02-01 20:53:25 -06:00
|
|
|
let vb: &mut [isize] = &mut v;
|
2014-02-13 11:46:46 -06:00
|
|
|
match vb {
|
2016-03-11 04:54:59 -06:00
|
|
|
&mut [_a, ref tail..] => {
|
2013-03-15 14:24:24 -05:00
|
|
|
v.push(tail[0] + tail[1]); //~ ERROR cannot borrow
|
2013-01-24 21:33:48 -06:00
|
|
|
}
|
|
|
|
_ => {}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|