error: you seem to be trying to use `Box>`. Consider using just `Vec<..>` --> $DIR/box_collection.rs:21:14 | LL | fn test(foo: Box>) {} | ^^^^^^^^^^^^^^ | = note: `-D clippy::box-collection` implied by `-D warnings` = help: `Vec<..>` is already on the heap, `Box>` makes an extra allocation 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: aborting due to 3 previous errors