Sample code:
fn main() {
let mut x: Vec<int> = vec!();
let y = x.swap_remove(0);
println!("{}", y);
}
Expected to print None, but instead it fails with:
task '<main>' failed at 'index out of bounds: the len is 0 but the index is 0', src/test.rs:1
rustc version: 0.12.0-pre.