]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/redundant_allocation.stderr
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[rust.git] / src / tools / clippy / tests / ui / redundant_allocation.stderr
1 error: usage of `Box<Rc<T>>`
2   --> $DIR/redundant_allocation.rs:25:30
3    |
4 LL |     pub fn box_test6<T>(foo: Box<Rc<T>>) {}
5    |                              ^^^^^^^^^^
6    |
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>`
10
11 error: usage of `Box<Arc<T>>`
12   --> $DIR/redundant_allocation.rs:27:30
13    |
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>`
82
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    |                                            ^^^^^^^^^^^^^^^^
88    |
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>>`
91
92 error: usage of `Arc<Box<bool>>`
93   --> $DIR/redundant_allocation.rs:67:25
94    |
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>`
100
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    |                         ^^^^^^^^^^^^^
106    |
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>`
109
110 error: usage of `Arc<Box<SubT<usize>>>`
111   --> $DIR/redundant_allocation.rs:71:27
112    |
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>>`
118
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    |                              ^^^^^^^^^^
124    |
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>`
127
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    |                                             ^^^^^^^^^^^^^^^^
133    |
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>>`
136
137 error: usage of `Rc<Box<Box<dyn T>>>`
138   --> $DIR/redundant_allocation.rs:97:27
139    |
140 LL |     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
146 error: aborting due to 16 previous errors
147