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