3 #![feature(box_syntax)]
6 struct LM { resize_at: usize, size: usize }
9 HashMap_(LM
, Vec
<(K
,V
)>)
12 fn linear_map
<K
,V
>() -> HashMap
<K
,V
> {
18 impl<K
,V
> HashMap
<K
,V
> {
19 pub fn len(&mut self) -> usize {
21 HashMap
::HashMap_(ref l
, _
) => l
.size
27 let mut m
: Box
<_
> = box linear_map
::<(),()>();
28 assert_eq
!(m
.len(), 0);