2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Box<Rc<T>>`
|
2023-07-03 17:42:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:16:30
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
LL | pub fn box_test6<T>(foo: Box<Rc<T>>) {}
|
|
|
|
| ^^^^^^^^^^
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
= note: `Rc<T>` is already on the heap, `Box<Rc<T>>` makes an extra allocation
|
|
|
|
= help: consider using just `Box<T>` or `Rc<T>`
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::redundant-allocation` implied by `-D warnings`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Box<Arc<T>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:20:30
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
LL | pub fn box_test7<T>(foo: Box<Arc<T>>) {}
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation
|
|
|
|
= help: consider using just `Box<T>` or `Arc<T>`
|
|
|
|
|
|
|
|
error: usage of `Box<Rc<SubT<usize>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:24:27
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn box_test8() -> Box<Rc<SubT<usize>>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Rc<SubT<usize>>` is already on the heap, `Box<Rc<SubT<usize>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Box<SubT<usize>>` or `Rc<SubT<usize>>`
|
|
|
|
|
|
|
|
error: usage of `Box<Arc<T>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:30:30
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation
|
|
|
|
= help: consider using just `Box<T>` or `Arc<T>`
|
|
|
|
|
|
|
|
error: usage of `Box<Arc<SubT<T>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:30:46
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Arc<SubT<T>>` is already on the heap, `Box<Arc<SubT<T>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Box<SubT<T>>` or `Arc<SubT<T>>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Box<bool>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:45:24
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn rc_test5(a: Rc<Box<bool>>) {}
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<bool>` is already on the heap, `Rc<Box<bool>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<bool>` or `Box<bool>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Arc<bool>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:49:24
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn rc_test7(a: Rc<Arc<bool>>) {}
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Arc<bool>` is already on the heap, `Rc<Arc<bool>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<bool>` or `Arc<bool>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Box<SubT<usize>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:53:26
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn rc_test8() -> Rc<Box<SubT<usize>>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<SubT<usize>>` is already on the heap, `Rc<Box<SubT<usize>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<SubT<usize>>` or `Box<SubT<usize>>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Arc<T>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:59:29
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<T>` or `Arc<T>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Rc<Arc<SubT<T>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:59:44
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
= note: `Arc<SubT<T>>` is already on the heap, `Rc<Arc<SubT<T>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<SubT<T>>` or `Arc<SubT<T>>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Arc<Box<bool>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:74:25
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
LL | pub fn arc_test5(a: Arc<Box<bool>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<bool>` is already on the heap, `Arc<Box<bool>>` makes an extra allocation
|
|
|
|
= help: consider using just `Arc<bool>` or `Box<bool>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Arc<Rc<bool>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:78:25
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn arc_test6(a: Arc<Rc<bool>>) {}
|
|
|
|
| ^^^^^^^^^^^^^
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
= note: `Rc<bool>` is already on the heap, `Arc<Rc<bool>>` makes an extra allocation
|
|
|
|
= help: consider using just `Arc<bool>` or `Rc<bool>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Arc<Box<SubT<usize>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:82:27
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
LL | pub fn arc_test8() -> Arc<Box<SubT<usize>>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<SubT<usize>>` is already on the heap, `Arc<Box<SubT<usize>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Arc<SubT<usize>>` or `Box<SubT<usize>>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Arc<Rc<T>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:88:30
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> {
|
|
|
|
| ^^^^^^^^^^
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
= note: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation
|
|
|
|
= help: consider using just `Arc<T>` or `Rc<T>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
error: usage of `Arc<Rc<SubT<T>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:88:45
|
2021-07-15 08:44:10 +00:00
|
|
|
|
|
|
|
|
LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2020-03-12 20:41:13 +00:00
|
|
|
|
|
2021-07-15 08:44:10 +00:00
|
|
|
= note: `Rc<SubT<T>>` is already on the heap, `Arc<Rc<SubT<T>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Arc<SubT<T>>` or `Rc<SubT<T>>`
|
2020-03-12 20:41:13 +00:00
|
|
|
|
2021-09-08 14:31:47 +00:00
|
|
|
error: usage of `Rc<Box<Box<dyn T>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:114:27
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
LL | pub fn test_rc_box(_: Rc<Box<Box<dyn T>>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<Box<dyn T>>` is already on the heap, `Rc<Box<Box<dyn T>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<Box<dyn T>>` or `Box<Box<dyn T>>`
|
|
|
|
|
2022-05-21 11:24:00 +00:00
|
|
|
error: usage of `Rc<Box<Box<str>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:148:31
|
2022-05-21 11:24:00 +00:00
|
|
|
|
|
|
|
|
LL | pub fn test_rc_box_str(_: Rc<Box<Box<str>>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<Box<str>>` is already on the heap, `Rc<Box<Box<str>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<Box<str>>` or `Box<Box<str>>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Box<Box<[usize]>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:151:33
|
2022-05-21 11:24:00 +00:00
|
|
|
|
|
|
|
|
LL | pub fn test_rc_box_slice(_: Rc<Box<Box<[usize]>>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<Box<[usize]>>` is already on the heap, `Rc<Box<Box<[usize]>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<Box<[usize]>>` or `Box<Box<[usize]>>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Box<Box<Path>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:154:32
|
2022-05-21 11:24:00 +00:00
|
|
|
|
|
|
|
|
LL | pub fn test_rc_box_path(_: Rc<Box<Box<Path>>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<Box<Path>>` is already on the heap, `Rc<Box<Box<Path>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<Box<Path>>` or `Box<Box<Path>>`
|
|
|
|
|
|
|
|
error: usage of `Rc<Box<Box<DynSized>>>`
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/redundant_allocation.rs:157:34
|
2022-05-21 11:24:00 +00:00
|
|
|
|
|
|
|
|
LL | pub fn test_rc_box_custom(_: Rc<Box<Box<DynSized>>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `Box<Box<DynSized>>` is already on the heap, `Rc<Box<Box<DynSized>>>` makes an extra allocation
|
|
|
|
= help: consider using just `Rc<Box<DynSized>>` or `Box<Box<DynSized>>`
|
|
|
|
|
|
|
|
error: aborting due to 20 previous errors
|
2020-03-12 20:41:13 +00:00
|
|
|
|