summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/vec_box_sized.stderr
blob: d6479271fa632c8738cdf122bfa210a90cf2280c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:26:14
   |
LL |     const C: Vec<Box<i32>> = Vec::new();
   |              ^^^^^^^^^^^^^ help: try: `Vec<i32>`
   |
   = note: `-D clippy::vec-box` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::vec_box)]`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:27:15
   |
LL |     static S: Vec<Box<i32>> = Vec::new();
   |               ^^^^^^^^^^^^^ help: try: `Vec<i32>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:30:21
   |
LL |         sized_type: Vec<Box<SizedStruct>>,
   |                     ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:33:14
   |
LL |     struct A(Vec<Box<SizedStruct>>);
   |              ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:34:18
   |
LL |     struct B(Vec<Vec<Box<(u32)>>>);
   |                  ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:36:42
   |
LL |     fn allocator_global_defined_vec() -> Vec<Box<i32>, std::alloc::Global> {
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:39:42
   |
LL |     fn allocator_global_defined_box() -> Vec<Box<i32, std::alloc::Global>> {
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:42:29
   |
LL |     fn allocator_match() -> Vec<Box<i32, DummyAllocator>, DummyAllocator> {
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`

error: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> $DIR/vec_box_sized.rs:79:23
   |
LL |         pub fn f() -> Vec<Box<S>> {
   |                       ^^^^^^^^^^^ help: try: `Vec<S>`

error: aborting due to 9 previous errors