error: usage of `Box>` --> $DIR/redundant_allocation.rs:25:30 | LL | pub fn box_test6(foo: Box>) {} | ^^^^^^^^^^ | = note: `-D clippy::redundant-allocation` implied by `-D warnings` = note: `Rc` is already on the heap, `Box>` makes an extra allocation = help: consider using just `Box` or `Rc` error: usage of `Box>` --> $DIR/redundant_allocation.rs:27:30 | LL | pub fn box_test7(foo: Box>) {} | ^^^^^^^^^^^ | = note: `Arc` is already on the heap, `Box>` makes an extra allocation = help: consider using just `Box` or `Arc` error: usage of `Box>>` --> $DIR/redundant_allocation.rs:29:27 | LL | pub fn box_test8() -> Box>> { | ^^^^^^^^^^^^^^^^^^^^ | = note: `Rc>` is already on the heap, `Box>>` makes an extra allocation = help: consider using just `Box>` or `Rc>` error: usage of `Box>` --> $DIR/redundant_allocation.rs:33:30 | LL | pub fn box_test9(foo: Box>) -> Box>> { | ^^^^^^^^^^^ | = note: `Arc` is already on the heap, `Box>` makes an extra allocation = help: consider using just `Box` or `Arc` error: usage of `Box>>` --> $DIR/redundant_allocation.rs:33:46 | LL | pub fn box_test9(foo: Box>) -> Box>> { | ^^^^^^^^^^^^^^^^^ | = note: `Arc>` is already on the heap, `Box>>` makes an extra allocation = help: consider using just `Box>` or `Arc>` error: usage of `Rc>` --> $DIR/redundant_allocation.rs:46:24 | LL | pub fn rc_test5(a: Rc>) {} | ^^^^^^^^^^^^^ | = note: `Box` is already on the heap, `Rc>` makes an extra allocation = help: consider using just `Rc` or `Box` error: usage of `Rc>` --> $DIR/redundant_allocation.rs:48:24 | LL | pub fn rc_test7(a: Rc>) {} | ^^^^^^^^^^^^^ | = note: `Arc` is already on the heap, `Rc>` makes an extra allocation = help: consider using just `Rc` or `Arc` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:50:26 | LL | pub fn rc_test8() -> Rc>> { | ^^^^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Box>` error: usage of `Rc>` --> $DIR/redundant_allocation.rs:54:29 | LL | pub fn rc_test9(foo: Rc>) -> Rc>> { | ^^^^^^^^^^ | = note: `Arc` is already on the heap, `Rc>` makes an extra allocation = help: consider using just `Rc` or `Arc` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:54:44 | LL | pub fn rc_test9(foo: Rc>) -> Rc>> { | ^^^^^^^^^^^^^^^^ | = note: `Arc>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Arc>` error: usage of `Arc>` --> $DIR/redundant_allocation.rs:67:25 | LL | pub fn arc_test5(a: Arc>) {} | ^^^^^^^^^^^^^^ | = note: `Box` is already on the heap, `Arc>` makes an extra allocation = help: consider using just `Arc` or `Box` error: usage of `Arc>` --> $DIR/redundant_allocation.rs:69:25 | LL | pub fn arc_test6(a: Arc>) {} | ^^^^^^^^^^^^^ | = note: `Rc` is already on the heap, `Arc>` makes an extra allocation = help: consider using just `Arc` or `Rc` error: usage of `Arc>>` --> $DIR/redundant_allocation.rs:71:27 | LL | pub fn arc_test8() -> Arc>> { | ^^^^^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Arc>>` makes an extra allocation = help: consider using just `Arc>` or `Box>` error: usage of `Arc>` --> $DIR/redundant_allocation.rs:75:30 | LL | pub fn arc_test9(foo: Arc>) -> Arc>> { | ^^^^^^^^^^ | = note: `Rc` is already on the heap, `Arc>` makes an extra allocation = help: consider using just `Arc` or `Rc` error: usage of `Arc>>` --> $DIR/redundant_allocation.rs:75:45 | LL | pub fn arc_test9(foo: Arc>) -> Arc>> { | ^^^^^^^^^^^^^^^^ | = note: `Rc>` is already on the heap, `Arc>>` makes an extra allocation = help: consider using just `Arc>` or `Rc>` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:97:27 | LL | pub fn test_rc_box(_: Rc>>) {} | ^^^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Box>` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:129:31 | LL | pub fn test_rc_box_str(_: Rc>>) {} | ^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Box>` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:130:33 | LL | pub fn test_rc_box_slice(_: Rc>>) {} | ^^^^^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Box>` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:131:32 | LL | pub fn test_rc_box_path(_: Rc>>) {} | ^^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Box>` error: usage of `Rc>>` --> $DIR/redundant_allocation.rs:132:34 | LL | pub fn test_rc_box_custom(_: Rc>>) {} | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation = help: consider using just `Rc>` or `Box>` error: aborting due to 20 previous errors