Skip to content

Instantly share code, notes, and snippets.

@burg
Created October 8, 2012 20:53
Show Gist options
  • Save burg/3854903 to your computer and use it in GitHub Desktop.
Save burg/3854903 to your computer and use it in GitHub Desktop.
reservation, please?
use core::dvec::DVec;
fn main() {
let v : DVec<int> = DVec();
v.reserve(1);
v.set_elt(0, 12345);
debug!("v=%?", v);
}
[burg@burg-macchiato Desktop]# ./test
rust: task failed at 'index out of bounds: the len is 0 but the index is 0', test.rs:1
rust: domain main @0x7f9553000010 root task failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment