8
8
| |_^
9
9
|
10
10
= note: `-D clippy::trailing-zero-sized-array-without-repr` implied by `-D warnings`
11
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
11
+ = help: consider annotating `RarelyUseful` with `#[repr(C)]` or another `repr` attribute
12
12
13
13
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
14
14
--> $DIR/trailing_zero_sized_array_without_repr.rs:11:1
@@ -18,7 +18,7 @@ LL | | first_and_last: [usize; 0],
18
18
LL | | }
19
19
| |_^
20
20
|
21
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
21
+ = help: consider annotating `OnlyField` with `#[repr(C)]` or another `repr` attribute
22
22
23
23
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
24
24
--> $DIR/trailing_zero_sized_array_without_repr.rs:15:1
@@ -29,19 +29,18 @@ LL | | last: [T; 0],
29
29
LL | | }
30
30
| |_^
31
31
|
32
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
32
+ = help: consider annotating `GenericArrayType` with `#[repr(C)]` or another `repr` attribute
33
33
34
34
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
35
- --> $DIR/trailing_zero_sized_array_without_repr.rs:20 :1
35
+ --> $DIR/trailing_zero_sized_array_without_repr.rs:21 :1
36
36
|
37
- LL | / #[must_use]
38
- LL | | struct OnlyAnotherAttribute {
37
+ LL | / struct OnlyAnotherAttribute {
39
38
LL | | field: i32,
40
39
LL | | last: [usize; 0],
41
40
LL | | }
42
41
| |_^
43
42
|
44
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
43
+ = help: consider annotating `OnlyAnotherAttribute` with `#[repr(C)]` or another `repr` attribute
45
44
46
45
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
47
46
--> $DIR/trailing_zero_sized_array_without_repr.rs:29:1
@@ -52,7 +51,7 @@ LL | | last: [usize; 0],
52
51
LL | | }
53
52
| |_^
54
53
|
55
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
54
+ = help: consider annotating `OnlyADeriveAttribute` with `#[repr(C)]` or another `repr` attribute
56
55
57
56
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
58
57
--> $DIR/trailing_zero_sized_array_without_repr.rs:35:1
@@ -63,7 +62,7 @@ LL | | last: [usize; ZERO],
63
62
LL | | }
64
63
| |_^
65
64
|
66
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
65
+ = help: consider annotating `ZeroSizedWithConst` with `#[repr(C)]` or another `repr` attribute
67
66
68
67
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
69
68
--> $DIR/trailing_zero_sized_array_without_repr.rs:44:1
@@ -74,26 +73,37 @@ LL | | last: [usize; compute_zero()],
74
73
LL | | }
75
74
| |_^
76
75
|
77
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
76
+ = help: consider annotating `ZeroSizedWithConstFunction` with `#[repr(C)]` or another `repr` attribute
78
77
79
78
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
80
- --> $DIR/trailing_zero_sized_array_without_repr.rs:49:1
79
+ --> $DIR/trailing_zero_sized_array_without_repr.rs:52:1
80
+ |
81
+ LL | / struct ZeroSizedWithConstFunction2 {
82
+ LL | | field: i32,
83
+ LL | | last: [usize; compute_zero_from_arg(1)],
84
+ LL | | }
85
+ | |_^
86
+ |
87
+ = help: consider annotating `ZeroSizedWithConstFunction2` with `#[repr(C)]` or another `repr` attribute
88
+
89
+ error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
90
+ --> $DIR/trailing_zero_sized_array_without_repr.rs:57:1
81
91
|
82
92
LL | struct ZeroSizedArrayWrapper([usize; 0]);
83
93
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
94
|
85
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
95
+ = help: consider annotating `ZeroSizedArrayWrapper` with `#[repr(C)]` or another `repr` attribute
86
96
87
97
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
88
- --> $DIR/trailing_zero_sized_array_without_repr.rs:51 :1
98
+ --> $DIR/trailing_zero_sized_array_without_repr.rs:59 :1
89
99
|
90
100
LL | struct TupleStruct(i32, [usize; 0]);
91
101
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
102
|
93
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
103
+ = help: consider annotating `TupleStruct` with `#[repr(C)]` or another `repr` attribute
94
104
95
105
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
96
- --> $DIR/trailing_zero_sized_array_without_repr.rs:53 :1
106
+ --> $DIR/trailing_zero_sized_array_without_repr.rs:61 :1
97
107
|
98
108
LL | / struct LotsOfFields {
99
109
LL | | f1: u32,
@@ -104,7 +114,7 @@ LL | | last: [usize; 0],
104
114
LL | | }
105
115
| |_^
106
116
|
107
- = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
117
+ = help: consider annotating `LotsOfFields` with `#[repr(C)]` or another `repr` attribute
108
118
109
- error: aborting due to 10 previous errors
119
+ error: aborting due to 11 previous errors
110
120
0 commit comments