@@ -80,20 +80,8 @@ error: `...` must be the last argument of a C-variadic function
8080LL | extern "C" fn f3_3(_: ..., x: isize) {}
8181 | ^^^^^^
8282
83- error: functions cannot be both `const` and C-variadic
84- --> $DIR/variadic-ffi-semantic-restrictions.rs:33:1
85- |
86- LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
87- | ^^^^^ `const` because of this ^^^^^^ C-variadic because of this
88-
89- error: functions cannot be both `const` and C-variadic
90- --> $DIR/variadic-ffi-semantic-restrictions.rs:37:1
91- |
92- LL | const extern "C" fn f4_2(x: isize, _: ...) {}
93- | ^^^^^ `const` because of this ^^^^^^ C-variadic because of this
94-
9583error: functions with a C variable argument list must be unsafe
96- --> $DIR/variadic-ffi-semantic-restrictions.rs:37 :36
84+ --> $DIR/variadic-ffi-semantic-restrictions.rs:36 :36
9785 |
9886LL | const extern "C" fn f4_2(x: isize, _: ...) {}
9987 | ^^^^^^
@@ -104,19 +92,13 @@ LL | const unsafe extern "C" fn f4_2(x: isize, _: ...) {}
10492 | ++++++
10593
10694error: `...` must be the last argument of a C-variadic function
107- --> $DIR/variadic-ffi-semantic-restrictions.rs:42 :26
95+ --> $DIR/variadic-ffi-semantic-restrictions.rs:40 :26
10896 |
10997LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
11098 | ^^^^^^
11199
112- error: functions cannot be both `const` and C-variadic
113- --> $DIR/variadic-ffi-semantic-restrictions.rs:42:1
114- |
115- LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
116- | ^^^^^ `const` because of this ^^^^^^ C-variadic because of this
117-
118100error: functions with a C variable argument list must be unsafe
119- --> $DIR/variadic-ffi-semantic-restrictions.rs:42 :44
101+ --> $DIR/variadic-ffi-semantic-restrictions.rs:40 :44
120102 |
121103LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
122104 | ^^^^^^
@@ -127,111 +109,103 @@ LL | const unsafe extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
127109 | ++++++
128110
129111error: `...` must be the last argument of a C-variadic function
130- --> $DIR/variadic-ffi-semantic-restrictions.rs:48 :13
112+ --> $DIR/variadic-ffi-semantic-restrictions.rs:45 :13
131113 |
132114LL | fn e_f2(..., x: isize);
133115 | ^^^
134116
135117error: `...` is not supported for non-extern functions
136- --> $DIR/variadic-ffi-semantic-restrictions.rs:55 :23
118+ --> $DIR/variadic-ffi-semantic-restrictions.rs:52 :23
137119 |
138120LL | fn i_f1(x: isize, _: ...) {}
139121 | ^^^^^^
140122 |
141123 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
142124
143125error: `...` is not supported for non-extern functions
144- --> $DIR/variadic-ffi-semantic-restrictions.rs:57 :13
126+ --> $DIR/variadic-ffi-semantic-restrictions.rs:54 :13
145127 |
146128LL | fn i_f2(_: ...) {}
147129 | ^^^^^^
148130 |
149131 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
150132
151133error: `...` must be the last argument of a C-variadic function
152- --> $DIR/variadic-ffi-semantic-restrictions.rs:59 :13
134+ --> $DIR/variadic-ffi-semantic-restrictions.rs:56 :13
153135 |
154136LL | fn i_f3(_: ..., x: isize, _: ...) {}
155137 | ^^^^^^
156138
157139error: `...` is not supported for non-extern functions
158- --> $DIR/variadic-ffi-semantic-restrictions.rs:59 :31
140+ --> $DIR/variadic-ffi-semantic-restrictions.rs:56 :31
159141 |
160142LL | fn i_f3(_: ..., x: isize, _: ...) {}
161143 | ^^^^^^
162144 |
163145 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
164146
165147error: `...` must be the last argument of a C-variadic function
166- --> $DIR/variadic-ffi-semantic-restrictions.rs:62 :13
148+ --> $DIR/variadic-ffi-semantic-restrictions.rs:59 :13
167149 |
168150LL | fn i_f4(_: ..., x: isize, _: ...) {}
169151 | ^^^^^^
170152
171153error: `...` is not supported for non-extern functions
172- --> $DIR/variadic-ffi-semantic-restrictions.rs:62 :31
154+ --> $DIR/variadic-ffi-semantic-restrictions.rs:59 :31
173155 |
174156LL | fn i_f4(_: ..., x: isize, _: ...) {}
175157 | ^^^^^^
176158 |
177159 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
178160
179- error: functions cannot be both `const` and C-variadic
180- --> $DIR/variadic-ffi-semantic-restrictions.rs:65:5
181- |
182- LL | const fn i_f5(x: isize, _: ...) {}
183- | ^^^^^ ^^^^^^ C-variadic because of this
184- | |
185- | `const` because of this
186-
187161error: `...` is not supported for non-extern functions
188- --> $DIR/variadic-ffi-semantic-restrictions.rs:65 :29
162+ --> $DIR/variadic-ffi-semantic-restrictions.rs:62 :29
189163 |
190164LL | const fn i_f5(x: isize, _: ...) {}
191165 | ^^^^^^
192166 |
193167 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
194168
195169error: `...` is not supported for non-extern functions
196- --> $DIR/variadic-ffi-semantic-restrictions.rs:72 :23
170+ --> $DIR/variadic-ffi-semantic-restrictions.rs:68 :23
197171 |
198172LL | fn t_f1(x: isize, _: ...) {}
199173 | ^^^^^^
200174 |
201175 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
202176
203177error: `...` is not supported for non-extern functions
204- --> $DIR/variadic-ffi-semantic-restrictions.rs:74 :23
178+ --> $DIR/variadic-ffi-semantic-restrictions.rs:70 :23
205179 |
206180LL | fn t_f2(x: isize, _: ...);
207181 | ^^^^^^
208182 |
209183 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
210184
211185error: `...` is not supported for non-extern functions
212- --> $DIR/variadic-ffi-semantic-restrictions.rs:76 :13
186+ --> $DIR/variadic-ffi-semantic-restrictions.rs:72 :13
213187 |
214188LL | fn t_f3(_: ...) {}
215189 | ^^^^^^
216190 |
217191 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
218192
219193error: `...` is not supported for non-extern functions
220- --> $DIR/variadic-ffi-semantic-restrictions.rs:78 :13
194+ --> $DIR/variadic-ffi-semantic-restrictions.rs:74 :13
221195 |
222196LL | fn t_f4(_: ...);
223197 | ^^^^^^
224198 |
225199 = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
226200
227201error: `...` must be the last argument of a C-variadic function
228- --> $DIR/variadic-ffi-semantic-restrictions.rs:80 :13
202+ --> $DIR/variadic-ffi-semantic-restrictions.rs:76 :13
229203 |
230204LL | fn t_f5(_: ..., x: isize) {}
231205 | ^^^^^^
232206
233207error: `...` must be the last argument of a C-variadic function
234- --> $DIR/variadic-ffi-semantic-restrictions.rs:82 :13
208+ --> $DIR/variadic-ffi-semantic-restrictions.rs:78 :13
235209 |
236210LL | fn t_f6(_: ..., x: isize);
237211 | ^^^^^^
@@ -245,21 +219,21 @@ LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
245219 | the destructor for this type cannot be evaluated in constant functions
246220
247221error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
248- --> $DIR/variadic-ffi-semantic-restrictions.rs:37 :36
222+ --> $DIR/variadic-ffi-semantic-restrictions.rs:36 :36
249223 |
250224LL | const extern "C" fn f4_2(x: isize, _: ...) {}
251225 | ^ - value is dropped here
252226 | |
253227 | the destructor for this type cannot be evaluated in constant functions
254228
255229error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
256- --> $DIR/variadic-ffi-semantic-restrictions.rs:65 :29
230+ --> $DIR/variadic-ffi-semantic-restrictions.rs:62 :29
257231 |
258232LL | const fn i_f5(x: isize, _: ...) {}
259233 | ^ - value is dropped here
260234 | |
261235 | the destructor for this type cannot be evaluated in constant functions
262236
263- error: aborting due to 33 previous errors
237+ error: aborting due to 29 previous errors
264238
265239For more information about this error, try `rustc --explain E0493`.
0 commit comments