Fix vec::mut_slice
auto merge of #6800 : june0cho/rust/issue5984, r=pcwalton

Fix #5984.
Resolve the problem which exists in #6780.