error: usage of `Box>` --> $DIR/redundant_allocation.rs:16: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` = help: to override `-D warnings` add `#[allow(clippy::redundant_allocation)]` error: usage of `Box>` --> $DIR/redundant_allocation.rs:20: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:24: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:30: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:30: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:45: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:49: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:53: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:59: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:59: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:74: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:78: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:82: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:88: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:88: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:114: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:148: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:151: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:154: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:157: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