2 use std::slice::from_raw_parts_mut;
4 pub fn as_mut_slice<T>(self_: &Vec<T>) -> &mut [T] {
5 unsafe { from_raw_parts_mut(self_.as_ptr() as *mut T, self_.len()) }
10 let v = vec![0, 1, 2];
11 let v1 = safe::as_mut_slice(&v);
12 let _v2 = safe::as_mut_slice(&v);
14 //~^ ERROR: /write access .* tag does not exist in the borrow stack/