Update Tests · rust-lang/rust@62a104d
@@ -4,104 +4,86 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic
44LL | fn f1_1(x: isize, ...) {}
55 | ^^^
667-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 | ^^^
18121913error: 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 | ^^^
241825-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 | ^^^
36243725error: `...` 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 | ^^^
42304331error: 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 | ^^^
48364937error: 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 | ^^^
544255-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 | ^^^
66486749error: `...` 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 | ^^^
72547355error: 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 | ^^^
78607961error: 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
84668567error: 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
90729173error: 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 | ^^^
96789779error: `...` 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 | ^^^
1028410385error: 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
1119311294error: 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 | ^^^ ^^^
11799118-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 | ^^^
129105130106error: 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 | ^^^
135111136-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 | ^^^
147117148118error: `...` 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 | ^^^
153123154124error: 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 | ^^^ ^^^
159129160130error: `...` 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 | ^^^
165135166136error: 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 | ^^^ ^^^
171141172142error: 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
179149180150error: 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 | ^^^
185155186156error: 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 | ^^^
191161192162error: 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 | ^^^
197167198-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 | ^^^
209173210-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 | ^^^
221179222180error: `...` 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 | ^^^
227185228186error: 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 | ^^^
233191234192error: `...` 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 | ^^^
239197240198error: 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 | ^^^
245203246204error[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
253211254212error[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
261219262220error[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
269227270-error: aborting due to 43 previous errors
228+error: aborting due to 36 previous errors
271229272230For more information about this error, try `rustc --explain E0493`.