error: you seem to be trying to use `Box>`. Consider using just `Vec<..>` --> $DIR/box_collection.rs:21:15 | LL | fn test1(foo: Box>) {} | ^^^^^^^^^^^^^^ | = help: `Vec<..>` is already on the heap, `Box>` makes an extra allocation = note: `-D clippy::box-collection` implied by `-D warnings` error: you seem to be trying to use `Box`. Consider using just `String` --> $DIR/box_collection.rs:28:15 | LL | fn test3(foo: Box) {} | ^^^^^^^^^^^ | = help: `String` is already on the heap, `Box` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `HashMap<..>` --> $DIR/box_collection.rs:30:15 | LL | fn test4(foo: Box>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `HashMap<..>` is already on the heap, `Box>` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `HashSet<..>` --> $DIR/box_collection.rs:32:15 | LL | fn test5(foo: Box>) {} | ^^^^^^^^^^^^^^^^^ | = help: `HashSet<..>` is already on the heap, `Box>` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `VecDeque<..>` --> $DIR/box_collection.rs:34:15 | LL | fn test6(foo: Box>) {} | ^^^^^^^^^^^^^^^^^^ | = help: `VecDeque<..>` is already on the heap, `Box>` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `LinkedList<..>` --> $DIR/box_collection.rs:36:15 | LL | fn test7(foo: Box>) {} | ^^^^^^^^^^^^^^^^^^^^ | = help: `LinkedList<..>` is already on the heap, `Box>` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `BTreeMap<..>` --> $DIR/box_collection.rs:38:15 | LL | fn test8(foo: Box>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `BTreeMap<..>` is already on the heap, `Box>` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `BTreeSet<..>` --> $DIR/box_collection.rs:40:15 | LL | fn test9(foo: Box>) {} | ^^^^^^^^^^^^^^^^^^ | = help: `BTreeSet<..>` is already on the heap, `Box>` makes an extra allocation error: you seem to be trying to use `Box>`. Consider using just `BinaryHeap<..>` --> $DIR/box_collection.rs:42:16 | LL | fn test10(foo: Box>) {} | ^^^^^^^^^^^^^^^^^^^^ | = help: `BinaryHeap<..>` is already on the heap, `Box>` makes an extra allocation error: aborting due to 9 previous errors