]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/redundant_allocation.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / redundant_allocation.stderr
CommitLineData
136023e0
XL
1error: usage of `Box<Rc<T>>`
2 --> $DIR/redundant_allocation.rs:25:30
f20569fa 3 |
136023e0
XL
4LL | 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
11error: usage of `Box<Arc<T>>`
12 --> $DIR/redundant_allocation.rs:27:30
f20569fa 13 |
136023e0
XL
14LL | 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
20error: usage of `Box<Rc<SubT<usize>>>`
21 --> $DIR/redundant_allocation.rs:29:27
22 |
23LL | 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
29error: usage of `Box<Arc<T>>`
30 --> $DIR/redundant_allocation.rs:33:30
31 |
32LL | 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
38error: usage of `Box<Arc<SubT<T>>>`
39 --> $DIR/redundant_allocation.rs:33:46
40 |
41LL | 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
47error: usage of `Rc<Box<bool>>`
48 --> $DIR/redundant_allocation.rs:46:24
49 |
50LL | 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
56error: usage of `Rc<Arc<bool>>`
57 --> $DIR/redundant_allocation.rs:48:24
58 |
59LL | 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
65error: usage of `Rc<Box<SubT<usize>>>`
66 --> $DIR/redundant_allocation.rs:50:26
67 |
68LL | 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
74error: usage of `Rc<Arc<T>>`
75 --> $DIR/redundant_allocation.rs:54:29
76 |
77LL | 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
83error: usage of `Rc<Arc<SubT<T>>>`
84 --> $DIR/redundant_allocation.rs:54:44
85 |
86LL | 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
92error: usage of `Arc<Box<bool>>`
93 --> $DIR/redundant_allocation.rs:67:25
f20569fa 94 |
136023e0
XL
95LL | 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
101error: usage of `Arc<Rc<bool>>`
102 --> $DIR/redundant_allocation.rs:69:25
103 |
104LL | 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
110error: usage of `Arc<Box<SubT<usize>>>`
111 --> $DIR/redundant_allocation.rs:71:27
f20569fa 112 |
136023e0
XL
113LL | 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
119error: usage of `Arc<Rc<T>>`
120 --> $DIR/redundant_allocation.rs:75:30
121 |
122LL | 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
128error: usage of `Arc<Rc<SubT<T>>>`
129 --> $DIR/redundant_allocation.rs:75:45
130 |
131LL | 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
c295e0f8
XL
137error: usage of `Rc<Box<Box<dyn T>>>`
138 --> $DIR/redundant_allocation.rs:97:27
139 |
140LL | pub fn test_rc_box(_: Rc<Box<Box<dyn T>>>) {}
141 | ^^^^^^^^^^^^^^^^^^^
142 |
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>>`
145
923072b8
FG
146error: usage of `Rc<Box<Box<str>>>`
147 --> $DIR/redundant_allocation.rs:129:31
148 |
149LL | pub fn test_rc_box_str(_: Rc<Box<Box<str>>>) {}
150 | ^^^^^^^^^^^^^^^^^
151 |
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>>`
154
155error: usage of `Rc<Box<Box<[usize]>>>`
156 --> $DIR/redundant_allocation.rs:130:33
157 |
158LL | pub fn test_rc_box_slice(_: Rc<Box<Box<[usize]>>>) {}
159 | ^^^^^^^^^^^^^^^^^^^^^
160 |
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]>>`
163
164error: usage of `Rc<Box<Box<Path>>>`
165 --> $DIR/redundant_allocation.rs:131:32
166 |
167LL | pub fn test_rc_box_path(_: Rc<Box<Box<Path>>>) {}
168 | ^^^^^^^^^^^^^^^^^^
169 |
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>>`
172
173error: usage of `Rc<Box<Box<DynSized>>>`
174 --> $DIR/redundant_allocation.rs:132:34
175 |
176LL | pub fn test_rc_box_custom(_: Rc<Box<Box<DynSized>>>) {}
177 | ^^^^^^^^^^^^^^^^^^^^^^
178 |
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>>`
181
182error: aborting due to 20 previous errors
f20569fa 183