]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_allocation_fixable.stderr
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / redundant_allocation_fixable.stderr
1 error: usage of `Box<&T>`
2   --> $DIR/redundant_allocation_fixable.rs:26:30
3    |
4 LL |     pub fn box_test1<T>(foo: Box<&T>) {}
5    |                              ^^^^^^^ help: try: `&T`
6    |
7    = note: `&T` is already a pointer, `Box<&T>` allocates a pointer on the heap
8    = note: `-D clippy::redundant-allocation` implied by `-D warnings`
9
10 error: usage of `Box<&MyStruct>`
11   --> $DIR/redundant_allocation_fixable.rs:28:27
12    |
13 LL |     pub fn box_test2(foo: Box<&MyStruct>) {}
14    |                           ^^^^^^^^^^^^^^ help: try: `&MyStruct`
15    |
16    = note: `&MyStruct` is already a pointer, `Box<&MyStruct>` allocates a pointer on the heap
17
18 error: usage of `Box<&MyEnum>`
19   --> $DIR/redundant_allocation_fixable.rs:30:27
20    |
21 LL |     pub fn box_test3(foo: Box<&MyEnum>) {}
22    |                           ^^^^^^^^^^^^ help: try: `&MyEnum`
23    |
24    = note: `&MyEnum` is already a pointer, `Box<&MyEnum>` allocates a pointer on the heap
25
26 error: usage of `Box<Box<T>>`
27   --> $DIR/redundant_allocation_fixable.rs:34:30
28    |
29 LL |     pub fn box_test5<T>(foo: Box<Box<T>>) {}
30    |                              ^^^^^^^^^^^ help: try: `Box<T>`
31    |
32    = note: `Box<T>` is already on the heap, `Box<Box<T>>` makes an extra allocation
33
34 error: usage of `Rc<&T>`
35   --> $DIR/redundant_allocation_fixable.rs:45:29
36    |
37 LL |     pub fn rc_test1<T>(foo: Rc<&T>) {}
38    |                             ^^^^^^ help: try: `&T`
39    |
40    = note: `&T` is already a pointer, `Rc<&T>` allocates a pointer on the heap
41
42 error: usage of `Rc<&MyStruct>`
43   --> $DIR/redundant_allocation_fixable.rs:47:26
44    |
45 LL |     pub fn rc_test2(foo: Rc<&MyStruct>) {}
46    |                          ^^^^^^^^^^^^^ help: try: `&MyStruct`
47    |
48    = note: `&MyStruct` is already a pointer, `Rc<&MyStruct>` allocates a pointer on the heap
49
50 error: usage of `Rc<&MyEnum>`
51   --> $DIR/redundant_allocation_fixable.rs:49:26
52    |
53 LL |     pub fn rc_test3(foo: Rc<&MyEnum>) {}
54    |                          ^^^^^^^^^^^ help: try: `&MyEnum`
55    |
56    = note: `&MyEnum` is already a pointer, `Rc<&MyEnum>` allocates a pointer on the heap
57
58 error: usage of `Rc<Rc<bool>>`
59   --> $DIR/redundant_allocation_fixable.rs:53:24
60    |
61 LL |     pub fn rc_test6(a: Rc<Rc<bool>>) {}
62    |                        ^^^^^^^^^^^^ help: try: `Rc<bool>`
63    |
64    = note: `Rc<bool>` is already on the heap, `Rc<Rc<bool>>` makes an extra allocation
65
66 error: usage of `Arc<&T>`
67   --> $DIR/redundant_allocation_fixable.rs:64:30
68    |
69 LL |     pub fn arc_test1<T>(foo: Arc<&T>) {}
70    |                              ^^^^^^^ help: try: `&T`
71    |
72    = note: `&T` is already a pointer, `Arc<&T>` allocates a pointer on the heap
73
74 error: usage of `Arc<&MyStruct>`
75   --> $DIR/redundant_allocation_fixable.rs:66:27
76    |
77 LL |     pub fn arc_test2(foo: Arc<&MyStruct>) {}
78    |                           ^^^^^^^^^^^^^^ help: try: `&MyStruct`
79    |
80    = note: `&MyStruct` is already a pointer, `Arc<&MyStruct>` allocates a pointer on the heap
81
82 error: usage of `Arc<&MyEnum>`
83   --> $DIR/redundant_allocation_fixable.rs:68:27
84    |
85 LL |     pub fn arc_test3(foo: Arc<&MyEnum>) {}
86    |                           ^^^^^^^^^^^^ help: try: `&MyEnum`
87    |
88    = note: `&MyEnum` is already a pointer, `Arc<&MyEnum>` allocates a pointer on the heap
89
90 error: usage of `Arc<Arc<bool>>`
91   --> $DIR/redundant_allocation_fixable.rs:72:25
92    |
93 LL |     pub fn arc_test7(a: Arc<Arc<bool>>) {}
94    |                         ^^^^^^^^^^^^^^ help: try: `Arc<bool>`
95    |
96    = note: `Arc<bool>` is already on the heap, `Arc<Arc<bool>>` makes an extra allocation
97
98 error: aborting due to 12 previous errors
99