@@ -4,104 +4,86 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic
4
4
LL | fn f1_1(x: isize, ...) {}
5
5
| ^^^
6
6
7
- error: C-variadic function must be declared with at least one named argument
8
- --> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
9
- |
10
- LL | fn f1_2(...) {}
11
- | ^^^
12
-
13
7
error: only foreign or `unsafe extern "C"` functions may be C-variadic
14
8
--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
15
9
|
16
10
LL | fn f1_2(...) {}
17
11
| ^^^
18
12
19
13
error: only foreign or `unsafe extern "C"` functions may be C-variadic
20
- --> $DIR/variadic-ffi-semantic-restrictions.rs:13 :30
14
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:12 :30
21
15
|
22
16
LL | extern "C" fn f2_1(x: isize, ...) {}
23
17
| ^^^
24
18
25
- error: C-variadic function must be declared with at least one named argument
26
- --> $DIR/variadic-ffi-semantic-restrictions.rs:16:20
27
- |
28
- LL | extern "C" fn f2_2(...) {}
29
- | ^^^
30
-
31
19
error: only foreign or `unsafe extern "C"` functions may be C-variadic
32
- --> $DIR/variadic-ffi-semantic-restrictions.rs:16 :20
20
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:15 :20
33
21
|
34
22
LL | extern "C" fn f2_2(...) {}
35
23
| ^^^
36
24
37
25
error: `...` must be the last argument of a C-variadic function
38
- --> $DIR/variadic-ffi-semantic-restrictions.rs:20 :20
26
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:18 :20
39
27
|
40
28
LL | extern "C" fn f2_3(..., x: isize) {}
41
29
| ^^^
42
30
43
31
error: only foreign or `unsafe extern "C"` functions may be C-variadic
44
- --> $DIR/variadic-ffi-semantic-restrictions.rs:20 :20
32
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:18 :20
45
33
|
46
34
LL | extern "C" fn f2_3(..., x: isize) {}
47
35
| ^^^
48
36
49
37
error: only foreign or `unsafe extern "C"` functions may be C-variadic
50
- --> $DIR/variadic-ffi-semantic-restrictions.rs:24 :30
38
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:22 :30
51
39
|
52
40
LL | extern "C" fn f3_1(x: isize, ...) {}
53
41
| ^^^
54
42
55
- error: C-variadic function must be declared with at least one named argument
56
- --> $DIR/variadic-ffi-semantic-restrictions.rs:27:20
57
- |
58
- LL | extern "C" fn f3_2(...) {}
59
- | ^^^
60
-
61
43
error: only foreign or `unsafe extern "C"` functions may be C-variadic
62
- --> $DIR/variadic-ffi-semantic-restrictions.rs:27 :20
44
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:25 :20
63
45
|
64
46
LL | extern "C" fn f3_2(...) {}
65
47
| ^^^
66
48
67
49
error: `...` must be the last argument of a C-variadic function
68
- --> $DIR/variadic-ffi-semantic-restrictions.rs:31 :20
50
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:28 :20
69
51
|
70
52
LL | extern "C" fn f3_3(..., x: isize) {}
71
53
| ^^^
72
54
73
55
error: only foreign or `unsafe extern "C"` functions may be C-variadic
74
- --> $DIR/variadic-ffi-semantic-restrictions.rs:31 :20
56
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:28 :20
75
57
|
76
58
LL | extern "C" fn f3_3(..., x: isize) {}
77
59
| ^^^
78
60
79
61
error: functions cannot be both `const` and C-variadic
80
- --> $DIR/variadic-ffi-semantic-restrictions.rs:35 :1
62
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:32 :1
81
63
|
82
64
LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}
83
65
| ^^^^^ `const` because of this ^^^ C-variadic because of this
84
66
85
67
error: functions cannot be both `const` and C-variadic
86
- --> $DIR/variadic-ffi-semantic-restrictions.rs:39 :1
68
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:36 :1
87
69
|
88
70
LL | const extern "C" fn f4_2(x: isize, ...) {}
89
71
| ^^^^^ `const` because of this ^^^ C-variadic because of this
90
72
91
73
error: only foreign or `unsafe extern "C"` functions may be C-variadic
92
- --> $DIR/variadic-ffi-semantic-restrictions.rs:39 :36
74
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:36 :36
93
75
|
94
76
LL | const extern "C" fn f4_2(x: isize, ...) {}
95
77
| ^^^
96
78
97
79
error: `...` must be the last argument of a C-variadic function
98
- --> $DIR/variadic-ffi-semantic-restrictions.rs:44 :26
80
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:41 :26
99
81
|
100
82
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
101
83
| ^^^
102
84
103
85
error: functions cannot be both `const` and C-variadic
104
- --> $DIR/variadic-ffi-semantic-restrictions.rs:44 :1
86
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:41 :1
105
87
|
106
88
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
107
89
| ^^^^^ ^^^ ^^^ C-variadic because of this
@@ -110,163 +92,139 @@ LL | const extern "C" fn f4_3(..., x: isize, ...) {}
110
92
| `const` because of this
111
93
112
94
error: only foreign or `unsafe extern "C"` functions may be C-variadic
113
- --> $DIR/variadic-ffi-semantic-restrictions.rs:44 :26
95
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:41 :26
114
96
|
115
97
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
116
98
| ^^^ ^^^
117
99
118
- error: C-variadic function must be declared with at least one named argument
119
- --> $DIR/variadic-ffi-semantic-restrictions.rs:50:13
120
- |
121
- LL | fn e_f1(...);
122
- | ^^^
123
-
124
100
error: `...` must be the last argument of a C-variadic function
125
- --> $DIR/variadic-ffi-semantic-restrictions.rs:52 :13
101
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:47 :13
126
102
|
127
103
LL | fn e_f2(..., x: isize);
128
104
| ^^^
129
105
130
106
error: only foreign or `unsafe extern "C"` functions may be C-variadic
131
- --> $DIR/variadic-ffi-semantic-restrictions.rs:59 :23
107
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:54 :23
132
108
|
133
109
LL | fn i_f1(x: isize, ...) {}
134
110
| ^^^
135
111
136
- error: C-variadic function must be declared with at least one named argument
137
- --> $DIR/variadic-ffi-semantic-restrictions.rs:61:13
138
- |
139
- LL | fn i_f2(...) {}
140
- | ^^^
141
-
142
112
error: only foreign or `unsafe extern "C"` functions may be C-variadic
143
- --> $DIR/variadic-ffi-semantic-restrictions.rs:61 :13
113
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:56 :13
144
114
|
145
115
LL | fn i_f2(...) {}
146
116
| ^^^
147
117
148
118
error: `...` must be the last argument of a C-variadic function
149
- --> $DIR/variadic-ffi-semantic-restrictions.rs:64 :13
119
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:58 :13
150
120
|
151
121
LL | fn i_f3(..., x: isize, ...) {}
152
122
| ^^^
153
123
154
124
error: only foreign or `unsafe extern "C"` functions may be C-variadic
155
- --> $DIR/variadic-ffi-semantic-restrictions.rs:64 :13
125
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:58 :13
156
126
|
157
127
LL | fn i_f3(..., x: isize, ...) {}
158
128
| ^^^ ^^^
159
129
160
130
error: `...` must be the last argument of a C-variadic function
161
- --> $DIR/variadic-ffi-semantic-restrictions.rs:67 :13
131
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:61 :13
162
132
|
163
133
LL | fn i_f4(..., x: isize, ...) {}
164
134
| ^^^
165
135
166
136
error: only foreign or `unsafe extern "C"` functions may be C-variadic
167
- --> $DIR/variadic-ffi-semantic-restrictions.rs:67 :13
137
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:61 :13
168
138
|
169
139
LL | fn i_f4(..., x: isize, ...) {}
170
140
| ^^^ ^^^
171
141
172
142
error: functions cannot be both `const` and C-variadic
173
- --> $DIR/variadic-ffi-semantic-restrictions.rs:70 :5
143
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:64 :5
174
144
|
175
145
LL | const fn i_f5(x: isize, ...) {}
176
146
| ^^^^^ ^^^ C-variadic because of this
177
147
| |
178
148
| `const` because of this
179
149
180
150
error: only foreign or `unsafe extern "C"` functions may be C-variadic
181
- --> $DIR/variadic-ffi-semantic-restrictions.rs:70 :29
151
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:64 :29
182
152
|
183
153
LL | const fn i_f5(x: isize, ...) {}
184
154
| ^^^
185
155
186
156
error: only foreign or `unsafe extern "C"` functions may be C-variadic
187
- --> $DIR/variadic-ffi-semantic-restrictions.rs:77 :23
157
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:71 :23
188
158
|
189
159
LL | fn t_f1(x: isize, ...) {}
190
160
| ^^^
191
161
192
162
error: only foreign or `unsafe extern "C"` functions may be C-variadic
193
- --> $DIR/variadic-ffi-semantic-restrictions.rs:79 :23
163
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:73 :23
194
164
|
195
165
LL | fn t_f2(x: isize, ...);
196
166
| ^^^
197
167
198
- error: C-variadic function must be declared with at least one named argument
199
- --> $DIR/variadic-ffi-semantic-restrictions.rs:81:13
200
- |
201
- LL | fn t_f3(...) {}
202
- | ^^^
203
-
204
168
error: only foreign or `unsafe extern "C"` functions may be C-variadic
205
- --> $DIR/variadic-ffi-semantic-restrictions.rs:81 :13
169
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:75 :13
206
170
|
207
171
LL | fn t_f3(...) {}
208
172
| ^^^
209
173
210
- error: C-variadic function must be declared with at least one named argument
211
- --> $DIR/variadic-ffi-semantic-restrictions.rs:84:13
212
- |
213
- LL | fn t_f4(...);
214
- | ^^^
215
-
216
174
error: only foreign or `unsafe extern "C"` functions may be C-variadic
217
- --> $DIR/variadic-ffi-semantic-restrictions.rs:84 :13
175
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:77 :13
218
176
|
219
177
LL | fn t_f4(...);
220
178
| ^^^
221
179
222
180
error: `...` must be the last argument of a C-variadic function
223
- --> $DIR/variadic-ffi-semantic-restrictions.rs:87 :13
181
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:79 :13
224
182
|
225
183
LL | fn t_f5(..., x: isize) {}
226
184
| ^^^
227
185
228
186
error: only foreign or `unsafe extern "C"` functions may be C-variadic
229
- --> $DIR/variadic-ffi-semantic-restrictions.rs:87 :13
187
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:79 :13
230
188
|
231
189
LL | fn t_f5(..., x: isize) {}
232
190
| ^^^
233
191
234
192
error: `...` must be the last argument of a C-variadic function
235
- --> $DIR/variadic-ffi-semantic-restrictions.rs:90 :13
193
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:82 :13
236
194
|
237
195
LL | fn t_f6(..., x: isize);
238
196
| ^^^
239
197
240
198
error: only foreign or `unsafe extern "C"` functions may be C-variadic
241
- --> $DIR/variadic-ffi-semantic-restrictions.rs:90 :13
199
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:82 :13
242
200
|
243
201
LL | fn t_f6(..., x: isize);
244
202
| ^^^
245
203
246
204
error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
247
- --> $DIR/variadic-ffi-semantic-restrictions.rs:35 :43
205
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:32 :43
248
206
|
249
207
LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}
250
208
| ^^^ - value is dropped here
251
209
| |
252
210
| the destructor for this type cannot be evaluated in constant functions
253
211
254
212
error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
255
- --> $DIR/variadic-ffi-semantic-restrictions.rs:39 :36
213
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:36 :36
256
214
|
257
215
LL | const extern "C" fn f4_2(x: isize, ...) {}
258
216
| ^^^ - value is dropped here
259
217
| |
260
218
| the destructor for this type cannot be evaluated in constant functions
261
219
262
220
error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
263
- --> $DIR/variadic-ffi-semantic-restrictions.rs:70 :29
221
+ --> $DIR/variadic-ffi-semantic-restrictions.rs:64 :29
264
222
|
265
223
LL | const fn i_f5(x: isize, ...) {}
266
224
| ^^^ - value is dropped here
267
225
| |
268
226
| the destructor for this type cannot be evaluated in constant functions
269
227
270
- error: aborting due to 43 previous errors
228
+ error: aborting due to 36 previous errors
271
229
272
230
For more information about this error, try `rustc --explain E0493`.
0 commit comments