2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:6:19
|
2019-12-02 01:38:33 +00:00
|
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
LL | fn f1_1(x: isize, ...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn f1_2(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn f1_2(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:13:30
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | extern "C" fn f2_1(x: isize, ...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:16:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | extern "C" fn f2_2(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:16:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | extern "C" fn f2_2(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:20:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | extern "C" fn f2_3(..., x: isize) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:20:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | extern "C" fn f2_3(..., x: isize) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:24:30
|
2019-12-02 01:38:33 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" fn f3_1(x: isize, ...) {}
|
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:27:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" fn f3_2(...) {}
|
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:27:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" fn f3_2(...) {}
|
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:31:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" fn f3_3(..., x: isize) {}
|
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2021-03-08 23:43:18 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:31:20
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" fn f3_3(..., x: isize) {}
|
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2023-10-29 21:28:56 +00:00
|
|
|
error: functions cannot be both `const` and C-variadic
|
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:35: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
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:39:1
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const extern "C" fn f4_2(x: isize, ...) {}
|
|
|
|
| ^^^^^ `const` because of this ^^^ C-variadic because of this
|
|
|
|
|
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:39:36
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const extern "C" fn f4_2(x: isize, ...) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:44:26
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: functions cannot be both `const` and C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:44:1
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
|
|
|
|
| ^^^^^ ^^^ ^^^ C-variadic because of this
|
|
|
|
| | |
|
|
|
|
| | C-variadic because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:44:26
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
|
|
|
|
| ^^^ ^^^
|
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:50:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn e_f1(...);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:52:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn e_f2(..., x: isize);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:59:23
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn i_f1(x: isize, ...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn i_f2(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn i_f2(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:64:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn i_f3(..., x: isize, ...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:64:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn i_f3(..., x: isize, ...) {}
|
2023-10-29 21:04:52 +00:00
|
|
|
| ^^^ ^^^
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:67:13
|
2019-12-02 01:38:33 +00:00
|
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
LL | fn i_f4(..., x: isize, ...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:67:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn i_f4(..., x: isize, ...) {}
|
2023-10-29 21:04:52 +00:00
|
|
|
| ^^^ ^^^
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2023-10-29 21:28:56 +00:00
|
|
|
error: functions cannot be both `const` and C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:70:5
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const fn i_f5(x: isize, ...) {}
|
|
|
|
| ^^^^^ ^^^ C-variadic because of this
|
|
|
|
| |
|
|
|
|
| `const` because of this
|
|
|
|
|
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:70:29
|
2023-10-29 21:28:56 +00:00
|
|
|
|
|
|
|
|
LL | const fn i_f5(x: isize, ...) {}
|
|
|
|
| ^^^
|
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:77:23
|
2019-12-02 01:38:33 +00:00
|
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
LL | fn t_f1(x: isize, ...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:79:23
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f2(x: isize, ...);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:81:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f3(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:81:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f3(...) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: C-variadic function must be declared with at least one named argument
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:84:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f4(...);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:84:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f4(...);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:87:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f5(..., x: isize) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:87:13
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
|
LL | fn t_f5(..., x: isize) {}
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 02:16:12 +00:00
|
|
|
|
|
|
|
error: `...` must be the last argument of a C-variadic function
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:90:13
|
2019-12-02 01:38:33 +00:00
|
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
LL | fn t_f6(..., x: isize);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2021-06-09 10:41:03 +00:00
|
|
|
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
2024-02-01 22:45:00 +00:00
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:90:13
|
2019-12-02 01:38:33 +00:00
|
|
|
|
|
2019-12-02 02:16:12 +00:00
|
|
|
LL | fn t_f6(..., x: isize);
|
2020-09-26 17:46:00 +00:00
|
|
|
| ^^^
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2024-02-01 22:45:00 +00:00
|
|
|
error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
|
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:35: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 `VaListImpl<'_>` cannot be evaluated at compile-time
|
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:39: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 `VaListImpl<'_>` cannot be evaluated at compile-time
|
|
|
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:70: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 43 previous errors
|
2019-12-02 01:38:33 +00:00
|
|
|
|
2024-02-01 22:45:00 +00:00
|
|
|
For more information about this error, try `rustc --explain E0493`.
|