|
1 |
| -error: you seem to be trying to use `Box<Rc<T>>`. Consider using just `Box<T>` of `Rc<T>` |
| 1 | +error: usage of `Box<Rc<T>>` |
2 | 2 | --> $DIR/redundant_allocation.rs:25:30
|
3 | 3 | |
|
4 | 4 | LL | pub fn box_test6<T>(foo: Box<Rc<T>>) {}
|
5 | 5 | | ^^^^^^^^^^
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::redundant-allocation` implied by `-D warnings`
|
8 |
| - = help: `Rc<T>` is already on the heap, `Box<Rc<T>>` makes an extra allocation |
| 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>` |
9 | 10 |
|
10 |
| -error: you seem to be trying to use `Box<Arc<T>>`. Consider using just `Box<T>` of `Arc<T>` |
| 11 | +error: usage of `Box<Arc<T>>` |
11 | 12 | --> $DIR/redundant_allocation.rs:27:30
|
12 | 13 | |
|
13 | 14 | LL | pub fn box_test7<T>(foo: Box<Arc<T>>) {}
|
14 | 15 | | ^^^^^^^^^^^
|
15 | 16 | |
|
16 |
| - = help: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation |
| 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>` |
17 | 19 |
|
18 |
| -error: you seem to be trying to use `Box<Rc<T>>`. Consider using just `Box<T>` of `Rc<T>` |
| 20 | +error: usage of `Box<Rc<T>>` |
19 | 21 | --> $DIR/redundant_allocation.rs:29:27
|
20 | 22 | |
|
21 | 23 | LL | pub fn box_test8() -> Box<Rc<SubT<usize>>> {
|
22 | 24 | | ^^^^^^^^^^^^^^^^^^^^
|
23 | 25 | |
|
24 |
| - = help: `Rc<T>` is already on the heap, `Box<Rc<T>>` makes an extra allocation |
| 26 | + = note: `Rc<T>` is already on the heap, `Box<Rc<T>>` makes an extra allocation |
| 27 | + = help: consider using just `Box<T>` or `Rc<T>` |
25 | 28 |
|
26 |
| -error: you seem to be trying to use `Box<Arc<T>>`. Consider using just `Box<T>` of `Arc<T>` |
| 29 | +error: usage of `Box<Arc<T>>` |
27 | 30 | --> $DIR/redundant_allocation.rs:33:30
|
28 | 31 | |
|
29 | 32 | LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> {
|
30 | 33 | | ^^^^^^^^^^^
|
31 | 34 | |
|
32 |
| - = help: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation |
| 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>` |
33 | 37 |
|
34 |
| -error: you seem to be trying to use `Box<Arc<T>>`. Consider using just `Box<T>` of `Arc<T>` |
| 38 | +error: usage of `Box<Arc<T>>` |
35 | 39 | --> $DIR/redundant_allocation.rs:33:46
|
36 | 40 | |
|
37 | 41 | LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> {
|
38 | 42 | | ^^^^^^^^^^^^^^^^^
|
39 | 43 | |
|
40 |
| - = help: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation |
| 44 | + = note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation |
| 45 | + = help: consider using just `Box<T>` or `Arc<T>` |
41 | 46 |
|
42 |
| -error: you seem to be trying to use `Rc<Box<T>>`. Consider using just `Rc<T>` of `Box<T>` |
| 47 | +error: usage of `Rc<Box<T>>` |
43 | 48 | --> $DIR/redundant_allocation.rs:46:24
|
44 | 49 | |
|
45 | 50 | LL | pub fn rc_test5(a: Rc<Box<bool>>) {}
|
46 | 51 | | ^^^^^^^^^^^^^
|
47 | 52 | |
|
48 |
| - = help: `Box<T>` is already on the heap, `Rc<Box<T>>` makes an extra allocation |
| 53 | + = note: `Box<T>` is already on the heap, `Rc<Box<T>>` makes an extra allocation |
| 54 | + = help: consider using just `Rc<T>` or `Box<T>` |
49 | 55 |
|
50 |
| -error: you seem to be trying to use `Rc<Arc<T>>`. Consider using just `Rc<T>` of `Arc<T>` |
| 56 | +error: usage of `Rc<Arc<T>>` |
51 | 57 | --> $DIR/redundant_allocation.rs:48:24
|
52 | 58 | |
|
53 | 59 | LL | pub fn rc_test7(a: Rc<Arc<bool>>) {}
|
54 | 60 | | ^^^^^^^^^^^^^
|
55 | 61 | |
|
56 |
| - = help: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation |
| 62 | + = note: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation |
| 63 | + = help: consider using just `Rc<T>` or `Arc<T>` |
57 | 64 |
|
58 |
| -error: you seem to be trying to use `Rc<Box<T>>`. Consider using just `Rc<T>` of `Box<T>` |
| 65 | +error: usage of `Rc<Box<T>>` |
59 | 66 | --> $DIR/redundant_allocation.rs:50:26
|
60 | 67 | |
|
61 | 68 | LL | pub fn rc_test8() -> Rc<Box<SubT<usize>>> {
|
62 | 69 | | ^^^^^^^^^^^^^^^^^^^^
|
63 | 70 | |
|
64 |
| - = help: `Box<T>` is already on the heap, `Rc<Box<T>>` makes an extra allocation |
| 71 | + = note: `Box<T>` is already on the heap, `Rc<Box<T>>` makes an extra allocation |
| 72 | + = help: consider using just `Rc<T>` or `Box<T>` |
65 | 73 |
|
66 |
| -error: you seem to be trying to use `Rc<Arc<T>>`. Consider using just `Rc<T>` of `Arc<T>` |
| 74 | +error: usage of `Rc<Arc<T>>` |
67 | 75 | --> $DIR/redundant_allocation.rs:54:29
|
68 | 76 | |
|
69 | 77 | LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> {
|
70 | 78 | | ^^^^^^^^^^
|
71 | 79 | |
|
72 |
| - = help: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation |
| 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>` |
73 | 82 |
|
74 |
| -error: you seem to be trying to use `Rc<Arc<T>>`. Consider using just `Rc<T>` of `Arc<T>` |
| 83 | +error: usage of `Rc<Arc<T>>` |
75 | 84 | --> $DIR/redundant_allocation.rs:54:44
|
76 | 85 | |
|
77 | 86 | LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> {
|
78 | 87 | | ^^^^^^^^^^^^^^^^
|
79 | 88 | |
|
80 |
| - = help: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation |
| 89 | + = note: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation |
| 90 | + = help: consider using just `Rc<T>` or `Arc<T>` |
81 | 91 |
|
82 |
| -error: you seem to be trying to use `Arc<Box<T>>`. Consider using just `Arc<T>` of `Box<T>` |
| 92 | +error: usage of `Arc<Box<T>>` |
83 | 93 | --> $DIR/redundant_allocation.rs:67:25
|
84 | 94 | |
|
85 | 95 | LL | pub fn arc_test5(a: Arc<Box<bool>>) {}
|
86 | 96 | | ^^^^^^^^^^^^^^
|
87 | 97 | |
|
88 |
| - = help: `Box<T>` is already on the heap, `Arc<Box<T>>` makes an extra allocation |
| 98 | + = note: `Box<T>` is already on the heap, `Arc<Box<T>>` makes an extra allocation |
| 99 | + = help: consider using just `Arc<T>` or `Box<T>` |
89 | 100 |
|
90 |
| -error: you seem to be trying to use `Arc<Rc<T>>`. Consider using just `Arc<T>` of `Rc<T>` |
| 101 | +error: usage of `Arc<Rc<T>>` |
91 | 102 | --> $DIR/redundant_allocation.rs:69:25
|
92 | 103 | |
|
93 | 104 | LL | pub fn arc_test6(a: Arc<Rc<bool>>) {}
|
94 | 105 | | ^^^^^^^^^^^^^
|
95 | 106 | |
|
96 |
| - = help: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation |
| 107 | + = note: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation |
| 108 | + = help: consider using just `Arc<T>` or `Rc<T>` |
97 | 109 |
|
98 |
| -error: you seem to be trying to use `Arc<Box<T>>`. Consider using just `Arc<T>` of `Box<T>` |
| 110 | +error: usage of `Arc<Box<T>>` |
99 | 111 | --> $DIR/redundant_allocation.rs:71:27
|
100 | 112 | |
|
101 | 113 | LL | pub fn arc_test8() -> Arc<Box<SubT<usize>>> {
|
102 | 114 | | ^^^^^^^^^^^^^^^^^^^^^
|
103 | 115 | |
|
104 |
| - = help: `Box<T>` is already on the heap, `Arc<Box<T>>` makes an extra allocation |
| 116 | + = note: `Box<T>` is already on the heap, `Arc<Box<T>>` makes an extra allocation |
| 117 | + = help: consider using just `Arc<T>` or `Box<T>` |
105 | 118 |
|
106 |
| -error: you seem to be trying to use `Arc<Rc<T>>`. Consider using just `Arc<T>` of `Rc<T>` |
| 119 | +error: usage of `Arc<Rc<T>>` |
107 | 120 | --> $DIR/redundant_allocation.rs:75:30
|
108 | 121 | |
|
109 | 122 | LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> {
|
110 | 123 | | ^^^^^^^^^^
|
111 | 124 | |
|
112 |
| - = help: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation |
| 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>` |
113 | 127 |
|
114 |
| -error: you seem to be trying to use `Arc<Rc<T>>`. Consider using just `Arc<T>` of `Rc<T>` |
| 128 | +error: usage of `Arc<Rc<T>>` |
115 | 129 | --> $DIR/redundant_allocation.rs:75:45
|
116 | 130 | |
|
117 | 131 | LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> {
|
118 | 132 | | ^^^^^^^^^^^^^^^^
|
119 | 133 | |
|
120 |
| - = help: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation |
| 134 | + = note: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation |
| 135 | + = help: consider using just `Arc<T>` or `Rc<T>` |
121 | 136 |
|
122 | 137 | error: aborting due to 15 previous errors
|
123 | 138 |
|
0 commit comments