rust/src/test/run-fail/unwind-misc-1.rs

19 lines
343 B
Rust
Raw Normal View History

// error-pattern:fail
use std;
2012-09-05 12:32:05 -07:00
use std::map;
use std::map::hashmap;
fn main() {
2012-03-26 18:35:18 -07:00
let count = @mut 0u;
let map = map::hashmap();
let mut arr = ~[];
2012-06-30 16:19:07 -07:00
for uint::range(0u, 10u) |i| {
arr += ~[@~"key stuff"];
map.insert(arr, arr + ~[@~"value stuff"]);
if arr.len() == 5 {
fail;
}
}
}