error: usage of `Box>` --> $DIR/redundant_allocation.rs:17:30 | LL | pub fn box_test6(foo: Box>) {} | ^^^^^^^^^^ | = note: `Rc` is already on the heap, `Box>` makes an extra allocation = help: consider using just `Box` or `Rc` = note: `-D clippy::redundant-allocation` implied by `-D warnings` error: usage of `Box>` --> $DIR/redundant_allocation.rs:19: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:21: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:25: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:25: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:37: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:39: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:41: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:45: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:45: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:57: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:59: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:61: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:65: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:65: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:87: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:119: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:120: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:121: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:122: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