1
1
error: `Vec<T>` is already on the heap, the boxing is unnecessary
2
- --> $DIR/vec_box_sized.rs:24 :14
2
+ --> $DIR/vec_box_sized.rs:26 :14
3
3
|
4
4
LL | const C: Vec<Box<i32>> = Vec::new();
5
5
| ^^^^^^^^^^^^^ help: try: `Vec<i32>`
@@ -8,49 +8,49 @@ LL | const C: Vec<Box<i32>> = Vec::new();
8
8
= help: to override `-D warnings` add `#[allow(clippy::vec_box)]`
9
9
10
10
error: `Vec<T>` is already on the heap, the boxing is unnecessary
11
- --> $DIR/vec_box_sized.rs:25 :15
11
+ --> $DIR/vec_box_sized.rs:27 :15
12
12
|
13
13
LL | static S: Vec<Box<i32>> = Vec::new();
14
14
| ^^^^^^^^^^^^^ help: try: `Vec<i32>`
15
15
16
16
error: `Vec<T>` is already on the heap, the boxing is unnecessary
17
- --> $DIR/vec_box_sized.rs:28 :21
17
+ --> $DIR/vec_box_sized.rs:30 :21
18
18
|
19
19
LL | sized_type: Vec<Box<SizedStruct>>,
20
20
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
21
21
22
22
error: `Vec<T>` is already on the heap, the boxing is unnecessary
23
- --> $DIR/vec_box_sized.rs:31 :14
23
+ --> $DIR/vec_box_sized.rs:33 :14
24
24
|
25
25
LL | struct A(Vec<Box<SizedStruct>>);
26
26
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
27
27
28
28
error: `Vec<T>` is already on the heap, the boxing is unnecessary
29
- --> $DIR/vec_box_sized.rs:32 :18
29
+ --> $DIR/vec_box_sized.rs:34 :18
30
30
|
31
31
LL | struct B(Vec<Vec<Box<(u32)>>>);
32
32
| ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`
33
33
34
34
error: `Vec<T>` is already on the heap, the boxing is unnecessary
35
- --> $DIR/vec_box_sized.rs:34 :42
35
+ --> $DIR/vec_box_sized.rs:36 :42
36
36
|
37
37
LL | fn allocator_global_defined_vec() -> Vec<Box<i32>, std::alloc::Global> {
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
39
39
40
40
error: `Vec<T>` is already on the heap, the boxing is unnecessary
41
- --> $DIR/vec_box_sized.rs:37 :42
41
+ --> $DIR/vec_box_sized.rs:39 :42
42
42
|
43
43
LL | fn allocator_global_defined_box() -> Vec<Box<i32, std::alloc::Global>> {
44
44
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
45
45
46
46
error: `Vec<T>` is already on the heap, the boxing is unnecessary
47
- --> $DIR/vec_box_sized.rs:40 :29
47
+ --> $DIR/vec_box_sized.rs:42 :29
48
48
|
49
49
LL | fn allocator_match() -> Vec<Box<i32, DummyAllocator>, DummyAllocator> {
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
51
51
52
52
error: `Vec<T>` is already on the heap, the boxing is unnecessary
53
- --> $DIR/vec_box_sized.rs:74 :23
53
+ --> $DIR/vec_box_sized.rs:76 :23
54
54
|
55
55
LL | pub fn f() -> Vec<Box<S>> {
56
56
| ^^^^^^^^^^^ help: try: `Vec<S>`
0 commit comments