// run-pass struct Node> { _children: C::Collection, } trait CollectionFactory { type Collection; } impl CollectionFactory for Vec<()> { type Collection = Vec; } trait Collection: Sized { fn push(&mut self, v: T); } impl Collection for Vec { fn push(&mut self, v: T) { self.push(v) } } fn main() { let _ = Node::> { _children: Vec::new(), }; }