]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
1 | error: usage of `Box<Rc<T>>` |
2 | --> $DIR/redundant_allocation.rs:25:30 | |
f20569fa | 3 | | |
136023e0 XL |
4 | LL | pub fn box_test6<T>(foo: Box<Rc<T>>) {} |
5 | | ^^^^^^^^^^ | |
f20569fa XL |
6 | | |
7 | = note: `-D clippy::redundant-allocation` implied by `-D warnings` | |
136023e0 XL |
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>` | |
f20569fa | 10 | |
136023e0 XL |
11 | error: usage of `Box<Arc<T>>` |
12 | --> $DIR/redundant_allocation.rs:27:30 | |
f20569fa | 13 | | |
136023e0 XL |
14 | LL | pub fn box_test7<T>(foo: Box<Arc<T>>) {} |
15 | | ^^^^^^^^^^^ | |
16 | | | |
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>` | |
19 | ||
20 | error: usage of `Box<Rc<SubT<usize>>>` | |
21 | --> $DIR/redundant_allocation.rs:29:27 | |
22 | | | |
23 | LL | pub fn box_test8() -> Box<Rc<SubT<usize>>> { | |
24 | | ^^^^^^^^^^^^^^^^^^^^ | |
25 | | | |
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>>` | |
28 | ||
29 | error: usage of `Box<Arc<T>>` | |
30 | --> $DIR/redundant_allocation.rs:33:30 | |
31 | | | |
32 | LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> { | |
33 | | ^^^^^^^^^^^ | |
34 | | | |
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>` | |
37 | ||
38 | error: usage of `Box<Arc<SubT<T>>>` | |
39 | --> $DIR/redundant_allocation.rs:33:46 | |
40 | | | |
41 | LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> { | |
42 | | ^^^^^^^^^^^^^^^^^ | |
43 | | | |
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>>` | |
46 | ||
47 | error: usage of `Rc<Box<bool>>` | |
48 | --> $DIR/redundant_allocation.rs:46:24 | |
49 | | | |
50 | LL | pub fn rc_test5(a: Rc<Box<bool>>) {} | |
51 | | ^^^^^^^^^^^^^ | |
52 | | | |
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>` | |
55 | ||
56 | error: usage of `Rc<Arc<bool>>` | |
57 | --> $DIR/redundant_allocation.rs:48:24 | |
58 | | | |
59 | LL | pub fn rc_test7(a: Rc<Arc<bool>>) {} | |
60 | | ^^^^^^^^^^^^^ | |
61 | | | |
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>` | |
64 | ||
65 | error: usage of `Rc<Box<SubT<usize>>>` | |
66 | --> $DIR/redundant_allocation.rs:50:26 | |
67 | | | |
68 | LL | pub fn rc_test8() -> Rc<Box<SubT<usize>>> { | |
69 | | ^^^^^^^^^^^^^^^^^^^^ | |
70 | | | |
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>>` | |
73 | ||
74 | error: usage of `Rc<Arc<T>>` | |
75 | --> $DIR/redundant_allocation.rs:54:29 | |
76 | | | |
77 | LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> { | |
78 | | ^^^^^^^^^^ | |
79 | | | |
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>` | |
f20569fa | 82 | |
136023e0 XL |
83 | error: usage of `Rc<Arc<SubT<T>>>` |
84 | --> $DIR/redundant_allocation.rs:54:44 | |
85 | | | |
86 | LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> { | |
87 | | ^^^^^^^^^^^^^^^^ | |
f20569fa | 88 | | |
136023e0 XL |
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>>` | |
f20569fa | 91 | |
136023e0 XL |
92 | error: usage of `Arc<Box<bool>>` |
93 | --> $DIR/redundant_allocation.rs:67:25 | |
f20569fa | 94 | | |
136023e0 XL |
95 | LL | pub fn arc_test5(a: Arc<Box<bool>>) {} |
96 | | ^^^^^^^^^^^^^^ | |
97 | | | |
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>` | |
f20569fa | 100 | |
136023e0 XL |
101 | error: usage of `Arc<Rc<bool>>` |
102 | --> $DIR/redundant_allocation.rs:69:25 | |
103 | | | |
104 | LL | pub fn arc_test6(a: Arc<Rc<bool>>) {} | |
105 | | ^^^^^^^^^^^^^ | |
f20569fa | 106 | | |
136023e0 XL |
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>` | |
f20569fa | 109 | |
136023e0 XL |
110 | error: usage of `Arc<Box<SubT<usize>>>` |
111 | --> $DIR/redundant_allocation.rs:71:27 | |
f20569fa | 112 | | |
136023e0 XL |
113 | LL | pub fn arc_test8() -> Arc<Box<SubT<usize>>> { |
114 | | ^^^^^^^^^^^^^^^^^^^^^ | |
115 | | | |
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>>` | |
f20569fa | 118 | |
136023e0 XL |
119 | error: usage of `Arc<Rc<T>>` |
120 | --> $DIR/redundant_allocation.rs:75:30 | |
121 | | | |
122 | LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> { | |
123 | | ^^^^^^^^^^ | |
f20569fa | 124 | | |
136023e0 XL |
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>` | |
f20569fa | 127 | |
136023e0 XL |
128 | error: usage of `Arc<Rc<SubT<T>>>` |
129 | --> $DIR/redundant_allocation.rs:75:45 | |
130 | | | |
131 | LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> { | |
132 | | ^^^^^^^^^^^^^^^^ | |
f20569fa | 133 | | |
136023e0 XL |
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>>` | |
f20569fa | 136 | |
136023e0 | 137 | error: aborting due to 15 previous errors |
f20569fa | 138 |