mozilla/rust — pull request #6780 by june0cho (2013-05-28 05:19:05+00:00)
Title: core::vec is missing methods for mutable slices

Fix #5984. Also, I found a problem on type inference.

For following two cases, case 1 works well if this commit is applied but case 2 occurs the error.
It seems to have a problem on inferring '&mut []' type.

case 1.
```
let mut vec_mutable: &mut [int] = ~[1, 2, 3, 4];
let mut v_slice = vec_mutable.mut_slice(2u, 4u);
assert_eq!(v_slice.len(), 2u);
assert_eq!(v_slice[0], 3);
assert_eq!(v_slice[1], 4);
```
case 2.
```
let mut vec_mutable = ~[1, 2, 3, 4];
let mut v_slice = vec_mutable.mut_slice(2u, 4u);
assert_eq!(v_slice.len(), 2u);
assert_eq!(v_slice[0], 3);
assert_eq!(v_slice[1], 4);
```
case2 occurs an error message.
```
issue5984.rs:60:22: 60:52 error: type `~[]` does not implement any method in scope named `mut_slice`
issue5984.rs:60 let mut v_slice = vec_mutable.mut_slice(2u, 4u);
```