@@ -4,104 +4,86 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic
44LL | fn f1_1(x: isize, ...) {}
55 | ^^^
66
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-
137error: only foreign or `unsafe extern "C"` functions may be C-variadic
148 --> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
159 |
1610LL | fn f1_2(...) {}
1711 | ^^^
1812
1913error: 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
2115 |
2216LL | extern "C" fn f2_1(x: isize, ...) {}
2317 | ^^^
2418
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-
3119error: 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
3321 |
3422LL | extern "C" fn f2_2(...) {}
3523 | ^^^
3624
3725error: `...` 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
3927 |
4028LL | extern "C" fn f2_3(..., x: isize) {}
4129 | ^^^
4230
4331error: 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
4533 |
4634LL | extern "C" fn f2_3(..., x: isize) {}
4735 | ^^^
4836
4937error: 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
5139 |
5240LL | extern "C" fn f3_1(x: isize, ...) {}
5341 | ^^^
5442
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-
6143error: 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
6345 |
6446LL | extern "C" fn f3_2(...) {}
6547 | ^^^
6648
6749error: `...` 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
6951 |
7052LL | extern "C" fn f3_3(..., x: isize) {}
7153 | ^^^
7254
7355error: 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
7557 |
7658LL | extern "C" fn f3_3(..., x: isize) {}
7759 | ^^^
7860
7961error: 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
8163 |
8264LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}
8365 | ^^^^^ `const` because of this ^^^ C-variadic because of this
8466
8567error: 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
8769 |
8870LL | const extern "C" fn f4_2(x: isize, ...) {}
8971 | ^^^^^ `const` because of this ^^^ C-variadic because of this
9072
9173error: 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
9375 |
9476LL | const extern "C" fn f4_2(x: isize, ...) {}
9577 | ^^^
9678
9779error: `...` 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
9981 |
10082LL | const extern "C" fn f4_3(..., x: isize, ...) {}
10183 | ^^^
10284
10385error: 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
10587 |
10688LL | const extern "C" fn f4_3(..., x: isize, ...) {}
10789 | ^^^^^ ^^^ ^^^ C-variadic because of this
@@ -110,163 +92,139 @@ LL | const extern "C" fn f4_3(..., x: isize, ...) {}
11092 | `const` because of this
11193
11294error: 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
11496 |
11597LL | const extern "C" fn f4_3(..., x: isize, ...) {}
11698 | ^^^ ^^^
11799
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-
124100error: `...` 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
126102 |
127103LL | fn e_f2(..., x: isize);
128104 | ^^^
129105
130106error: 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
132108 |
133109LL | fn i_f1(x: isize, ...) {}
134110 | ^^^
135111
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-
142112error: 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
144114 |
145115LL | fn i_f2(...) {}
146116 | ^^^
147117
148118error: `...` 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
150120 |
151121LL | fn i_f3(..., x: isize, ...) {}
152122 | ^^^
153123
154124error: 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
156126 |
157127LL | fn i_f3(..., x: isize, ...) {}
158128 | ^^^ ^^^
159129
160130error: `...` 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
162132 |
163133LL | fn i_f4(..., x: isize, ...) {}
164134 | ^^^
165135
166136error: 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
168138 |
169139LL | fn i_f4(..., x: isize, ...) {}
170140 | ^^^ ^^^
171141
172142error: 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
174144 |
175145LL | const fn i_f5(x: isize, ...) {}
176146 | ^^^^^ ^^^ C-variadic because of this
177147 | |
178148 | `const` because of this
179149
180150error: 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
182152 |
183153LL | const fn i_f5(x: isize, ...) {}
184154 | ^^^
185155
186156error: 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
188158 |
189159LL | fn t_f1(x: isize, ...) {}
190160 | ^^^
191161
192162error: 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
194164 |
195165LL | fn t_f2(x: isize, ...);
196166 | ^^^
197167
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-
204168error: 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
206170 |
207171LL | fn t_f3(...) {}
208172 | ^^^
209173
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-
216174error: 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
218176 |
219177LL | fn t_f4(...);
220178 | ^^^
221179
222180error: `...` 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
224182 |
225183LL | fn t_f5(..., x: isize) {}
226184 | ^^^
227185
228186error: 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
230188 |
231189LL | fn t_f5(..., x: isize) {}
232190 | ^^^
233191
234192error: `...` 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
236194 |
237195LL | fn t_f6(..., x: isize);
238196 | ^^^
239197
240198error: 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
242200 |
243201LL | fn t_f6(..., x: isize);
244202 | ^^^
245203
246204error[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
248206 |
249207LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}
250208 | ^^^ - value is dropped here
251209 | |
252210 | the destructor for this type cannot be evaluated in constant functions
253211
254212error[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
256214 |
257215LL | const extern "C" fn f4_2(x: isize, ...) {}
258216 | ^^^ - value is dropped here
259217 | |
260218 | the destructor for this type cannot be evaluated in constant functions
261219
262220error[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
264222 |
265223LL | const fn i_f5(x: isize, ...) {}
266224 | ^^^ - value is dropped here
267225 | |
268226 | the destructor for this type cannot be evaluated in constant functions
269227
270- error: aborting due to 43 previous errors
228+ error: aborting due to 36 previous errors
271229
272230For more information about this error, try `rustc --explain E0493`.
0 commit comments