| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:6:19 |
| | |
| LL | fn f1_1(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:9:9 |
| | |
| LL | fn f1_2(_: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for `extern "Rust"` functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:12:30 |
| | |
| LL | unsafe extern "Rust" fn f1_3(_: ...) {} |
| | ------------- ^^^^^^ |
| | | |
| | `extern "Rust"` because of this |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: functions with a C variable argument list must be unsafe |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:15:30 |
| | |
| LL | extern "C" fn f2_1(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| help: add the `unsafe` keyword to this definition |
| | |
| LL | unsafe extern "C" fn f2_1(x: isize, _: ...) {} |
| | ++++++ |
| |
| error: functions with a C variable argument list must be unsafe |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:18:20 |
| | |
| LL | extern "C" fn f2_2(_: ...) {} |
| | ^^^^^^ |
| | |
| help: add the `unsafe` keyword to this definition |
| | |
| LL | unsafe extern "C" fn f2_2(_: ...) {} |
| | ++++++ |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:21:20 |
| | |
| LL | extern "C" fn f2_3(_: ..., x: isize) {} |
| | ^^^^^^ |
| |
| error: functions with a C variable argument list must be unsafe |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:24:30 |
| | |
| LL | extern "C" fn f3_1(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| help: add the `unsafe` keyword to this definition |
| | |
| LL | unsafe extern "C" fn f3_1(x: isize, _: ...) {} |
| | ++++++ |
| |
| error: functions with a C variable argument list must be unsafe |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:27:20 |
| | |
| LL | extern "C" fn f3_2(_: ...) {} |
| | ^^^^^^ |
| | |
| help: add the `unsafe` keyword to this definition |
| | |
| LL | unsafe extern "C" fn f3_2(_: ...) {} |
| | ++++++ |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:30:20 |
| | |
| LL | extern "C" fn f3_3(_: ..., x: isize) {} |
| | ^^^^^^ |
| |
| error: functions cannot be both `const` and C-variadic |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:33:1 |
| | |
| LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {} |
| | ^^^^^ `const` because of this ^^^^^^ C-variadic because of this |
| |
| error: functions cannot be both `const` and C-variadic |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:37:1 |
| | |
| LL | const extern "C" fn f4_2(x: isize, _: ...) {} |
| | ^^^^^ `const` because of this ^^^^^^ C-variadic because of this |
| |
| error: functions with a C variable argument list must be unsafe |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:37:36 |
| | |
| LL | const extern "C" fn f4_2(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| help: add the `unsafe` keyword to this definition |
| | |
| LL | const unsafe extern "C" fn f4_2(x: isize, _: ...) {} |
| | ++++++ |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:42:26 |
| | |
| LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {} |
| | ^^^^^^ |
| |
| error: functions cannot be both `const` and C-variadic |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:42:1 |
| | |
| LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {} |
| | ^^^^^ `const` because of this ^^^^^^ C-variadic because of this |
| |
| error: functions with a C variable argument list must be unsafe |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:42:44 |
| | |
| LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| help: add the `unsafe` keyword to this definition |
| | |
| LL | const unsafe extern "C" fn f4_3(_: ..., x: isize, _: ...) {} |
| | ++++++ |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:48:13 |
| | |
| LL | fn e_f2(..., x: isize); |
| | ^^^ |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:55:23 |
| | |
| LL | fn i_f1(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:57:13 |
| | |
| LL | fn i_f2(_: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13 |
| | |
| LL | fn i_f3(_: ..., x: isize, _: ...) {} |
| | ^^^^^^ |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:59:31 |
| | |
| LL | fn i_f3(_: ..., x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:62:13 |
| | |
| LL | fn i_f4(_: ..., x: isize, _: ...) {} |
| | ^^^^^^ |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:62:31 |
| | |
| LL | fn i_f4(_: ..., x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: functions cannot be both `const` and C-variadic |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:65:5 |
| | |
| LL | const fn i_f5(x: isize, _: ...) {} |
| | ^^^^^ ^^^^^^ C-variadic because of this |
| | | |
| | `const` because of this |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:65:29 |
| | |
| LL | const fn i_f5(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:72:23 |
| | |
| LL | fn t_f1(x: isize, _: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:74:23 |
| | |
| LL | fn t_f2(x: isize, _: ...); |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:76:13 |
| | |
| LL | fn t_f3(_: ...) {} |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` is not supported for non-extern functions |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13 |
| | |
| LL | fn t_f4(_: ...); |
| | ^^^^^^ |
| | |
| = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:80:13 |
| | |
| LL | fn t_f5(_: ..., x: isize) {} |
| | ^^^^^^ |
| |
| error: `...` must be the last argument of a C-variadic function |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:82:13 |
| | |
| LL | fn t_f6(_: ..., x: isize); |
| | ^^^^^^ |
| |
| error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:33:43 |
| | |
| LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {} |
| | ^ - value is dropped here |
| | | |
| | the destructor for this type cannot be evaluated in constant functions |
| |
| error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:37:36 |
| | |
| LL | const extern "C" fn f4_2(x: isize, _: ...) {} |
| | ^ - value is dropped here |
| | | |
| | the destructor for this type cannot be evaluated in constant functions |
| |
| error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time |
| --> $DIR/variadic-ffi-semantic-restrictions.rs:65:29 |
| | |
| LL | const fn i_f5(x: isize, _: ...) {} |
| | ^ - value is dropped here |
| | | |
| | the destructor for this type cannot be evaluated in constant functions |
| |
| error: aborting due to 33 previous errors |
| |
| For more information about this error, try `rustc --explain E0493`. |