Closed
Description
The following code causes a panic in set(i) ('assertion failed: probe.index() != idx_end'). The current belief is that clear() causes the underlying array to shrink below tested levels (being fixed independently), at which point a corner case may show up in insertion.
use std::collections::HashMap;
use std::collections::hash_map::Vacant;
fn main()
{
let mut m = HashMap::with_capacity(4);
m.clear();
for i in range(0u, 4)
{
match m.entry(i)
{
Vacant(x) => { x.set(i); },
_ => {},
}
}
}
Metadata
Metadata
Assignees
Labels
No labels