1 error: usage of `Box<Rc<T>>`
2 --> $DIR/redundant_allocation.rs:17:30
4 LL | pub fn box_test6<T>(foo: Box<Rc<T>>) {}
7 = note: `-D clippy::redundant-allocation` implied by `-D warnings`
8 = note: `Rc<T>` is already on the heap, `Box<Rc<T>>` makes an extra allocation
9 = help: consider using just `Box<T>` or `Rc<T>`
11 error: usage of `Box<Arc<T>>`
12 --> $DIR/redundant_allocation.rs:19:30
14 LL | pub fn box_test7<T>(foo: Box<Arc<T>>) {}
17 = note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation
18 = help: consider using just `Box<T>` or `Arc<T>`
20 error: usage of `Box<Rc<SubT<usize>>>`
21 --> $DIR/redundant_allocation.rs:21:27
23 LL | pub fn box_test8() -> Box<Rc<SubT<usize>>> {
24 | ^^^^^^^^^^^^^^^^^^^^
26 = note: `Rc<SubT<usize>>` is already on the heap, `Box<Rc<SubT<usize>>>` makes an extra allocation
27 = help: consider using just `Box<SubT<usize>>` or `Rc<SubT<usize>>`
29 error: usage of `Box<Arc<T>>`
30 --> $DIR/redundant_allocation.rs:25:30
32 LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> {
35 = note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation
36 = help: consider using just `Box<T>` or `Arc<T>`
38 error: usage of `Box<Arc<SubT<T>>>`
39 --> $DIR/redundant_allocation.rs:25:46
41 LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> {
44 = note: `Arc<SubT<T>>` is already on the heap, `Box<Arc<SubT<T>>>` makes an extra allocation
45 = help: consider using just `Box<SubT<T>>` or `Arc<SubT<T>>`
47 error: usage of `Rc<Box<bool>>`
48 --> $DIR/redundant_allocation.rs:37:24
50 LL | pub fn rc_test5(a: Rc<Box<bool>>) {}
53 = note: `Box<bool>` is already on the heap, `Rc<Box<bool>>` makes an extra allocation
54 = help: consider using just `Rc<bool>` or `Box<bool>`
56 error: usage of `Rc<Arc<bool>>`
57 --> $DIR/redundant_allocation.rs:39:24
59 LL | pub fn rc_test7(a: Rc<Arc<bool>>) {}
62 = note: `Arc<bool>` is already on the heap, `Rc<Arc<bool>>` makes an extra allocation
63 = help: consider using just `Rc<bool>` or `Arc<bool>`
65 error: usage of `Rc<Box<SubT<usize>>>`
66 --> $DIR/redundant_allocation.rs:41:26
68 LL | pub fn rc_test8() -> Rc<Box<SubT<usize>>> {
69 | ^^^^^^^^^^^^^^^^^^^^
71 = note: `Box<SubT<usize>>` is already on the heap, `Rc<Box<SubT<usize>>>` makes an extra allocation
72 = help: consider using just `Rc<SubT<usize>>` or `Box<SubT<usize>>`
74 error: usage of `Rc<Arc<T>>`
75 --> $DIR/redundant_allocation.rs:45:29
77 LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> {
80 = note: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation
81 = help: consider using just `Rc<T>` or `Arc<T>`
83 error: usage of `Rc<Arc<SubT<T>>>`
84 --> $DIR/redundant_allocation.rs:45:44
86 LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> {
89 = note: `Arc<SubT<T>>` is already on the heap, `Rc<Arc<SubT<T>>>` makes an extra allocation
90 = help: consider using just `Rc<SubT<T>>` or `Arc<SubT<T>>`
92 error: usage of `Arc<Box<bool>>`
93 --> $DIR/redundant_allocation.rs:57:25
95 LL | pub fn arc_test5(a: Arc<Box<bool>>) {}
98 = note: `Box<bool>` is already on the heap, `Arc<Box<bool>>` makes an extra allocation
99 = help: consider using just `Arc<bool>` or `Box<bool>`
101 error: usage of `Arc<Rc<bool>>`
102 --> $DIR/redundant_allocation.rs:59:25
104 LL | pub fn arc_test6(a: Arc<Rc<bool>>) {}
107 = note: `Rc<bool>` is already on the heap, `Arc<Rc<bool>>` makes an extra allocation
108 = help: consider using just `Arc<bool>` or `Rc<bool>`
110 error: usage of `Arc<Box<SubT<usize>>>`
111 --> $DIR/redundant_allocation.rs:61:27
113 LL | pub fn arc_test8() -> Arc<Box<SubT<usize>>> {
114 | ^^^^^^^^^^^^^^^^^^^^^
116 = note: `Box<SubT<usize>>` is already on the heap, `Arc<Box<SubT<usize>>>` makes an extra allocation
117 = help: consider using just `Arc<SubT<usize>>` or `Box<SubT<usize>>`
119 error: usage of `Arc<Rc<T>>`
120 --> $DIR/redundant_allocation.rs:65:30
122 LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> {
125 = note: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation
126 = help: consider using just `Arc<T>` or `Rc<T>`
128 error: usage of `Arc<Rc<SubT<T>>>`
129 --> $DIR/redundant_allocation.rs:65:45
131 LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> {
134 = note: `Rc<SubT<T>>` is already on the heap, `Arc<Rc<SubT<T>>>` makes an extra allocation
135 = help: consider using just `Arc<SubT<T>>` or `Rc<SubT<T>>`
137 error: usage of `Rc<Box<Box<dyn T>>>`
138 --> $DIR/redundant_allocation.rs:87:27
140 LL | pub fn test_rc_box(_: Rc<Box<Box<dyn T>>>) {}
141 | ^^^^^^^^^^^^^^^^^^^
143 = note: `Box<Box<dyn T>>` is already on the heap, `Rc<Box<Box<dyn T>>>` makes an extra allocation
144 = help: consider using just `Rc<Box<dyn T>>` or `Box<Box<dyn T>>`
146 error: usage of `Rc<Box<Box<str>>>`
147 --> $DIR/redundant_allocation.rs:119:31
149 LL | pub fn test_rc_box_str(_: Rc<Box<Box<str>>>) {}
152 = note: `Box<Box<str>>` is already on the heap, `Rc<Box<Box<str>>>` makes an extra allocation
153 = help: consider using just `Rc<Box<str>>` or `Box<Box<str>>`
155 error: usage of `Rc<Box<Box<[usize]>>>`
156 --> $DIR/redundant_allocation.rs:120:33
158 LL | pub fn test_rc_box_slice(_: Rc<Box<Box<[usize]>>>) {}
159 | ^^^^^^^^^^^^^^^^^^^^^
161 = note: `Box<Box<[usize]>>` is already on the heap, `Rc<Box<Box<[usize]>>>` makes an extra allocation
162 = help: consider using just `Rc<Box<[usize]>>` or `Box<Box<[usize]>>`
164 error: usage of `Rc<Box<Box<Path>>>`
165 --> $DIR/redundant_allocation.rs:121:32
167 LL | pub fn test_rc_box_path(_: Rc<Box<Box<Path>>>) {}
170 = note: `Box<Box<Path>>` is already on the heap, `Rc<Box<Box<Path>>>` makes an extra allocation
171 = help: consider using just `Rc<Box<Path>>` or `Box<Box<Path>>`
173 error: usage of `Rc<Box<Box<DynSized>>>`
174 --> $DIR/redundant_allocation.rs:122:34
176 LL | pub fn test_rc_box_custom(_: Rc<Box<Box<DynSized>>>) {}
177 | ^^^^^^^^^^^^^^^^^^^^^^
179 = note: `Box<Box<DynSized>>` is already on the heap, `Rc<Box<Box<DynSized>>>` makes an extra allocation
180 = help: consider using just `Rc<Box<DynSized>>` or `Box<Box<DynSized>>`
182 error: aborting due to 20 previous errors