compiler: Mention C-unwind in C-variadic error
This commit is contained in:
parent
26dccadb47
commit
43a6b018a2
@ -28,7 +28,7 @@ ast_passes_auto_super_lifetime = auto traits cannot have super traits or lifetim
|
|||||||
.label = {ast_passes_auto_super_lifetime}
|
.label = {ast_passes_auto_super_lifetime}
|
||||||
.suggestion = remove the super traits or lifetime bounds
|
.suggestion = remove the super traits or lifetime bounds
|
||||||
|
|
||||||
ast_passes_bad_c_variadic = only foreign or `unsafe extern "C"` functions may be C-variadic
|
ast_passes_bad_c_variadic = only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
ast_passes_bare_fn_invalid_safety = function pointers cannot be declared with `safe` safety qualifier
|
ast_passes_bare_fn_invalid_safety = function pointers cannot be declared with `safe` safety qualifier
|
||||||
.suggestion = remove safe from this item
|
.suggestion = remove safe from this item
|
||||||
|
@ -46,7 +46,7 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
|
LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/issue-86053-1.rs:11:12
|
--> $DIR/issue-86053-1.rs:11:12
|
||||||
|
|
|
|
||||||
LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
|
LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
fn foo(_: Bar, ...) -> impl {}
|
fn foo(_: Bar, ...) -> impl {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR cannot find type `Bar` in this scope
|
//~| ERROR cannot find type `Bar` in this scope
|
||||||
//~| ERROR at least one trait must be specified
|
//~| ERROR at least one trait must be specified
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/issue-83499-input-output-iteration-ice.rs:7:16
|
--> $DIR/issue-83499-input-output-iteration-ice.rs:7:16
|
||||||
|
|
|
|
||||||
LL | fn foo(_: Bar, ...) -> impl {}
|
LL | fn foo(_: Bar, ...) -> impl {}
|
||||||
|
@ -4,29 +4,29 @@
|
|||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
fn f1_1(x: isize, ...) {}
|
fn f1_1(x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
fn f1_2(...) {}
|
fn f1_2(...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
extern "C" fn f2_1(x: isize, ...) {}
|
extern "C" fn f2_1(x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
extern "C" fn f2_2(...) {}
|
extern "C" fn f2_2(...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
extern "C" fn f2_3(..., x: isize) {}
|
extern "C" fn f2_3(..., x: isize) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
|
|
||||||
extern "C" fn f3_1(x: isize, ...) {}
|
extern "C" fn f3_1(x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
extern "C" fn f3_2(...) {}
|
extern "C" fn f3_2(...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
|
||||||
extern "C" fn f3_3(..., x: isize) {}
|
extern "C" fn f3_3(..., x: isize) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
|
|
||||||
const unsafe extern "C" fn f4_1(x: isize, ...) {}
|
const unsafe extern "C" fn f4_1(x: isize, ...) {}
|
||||||
@ -35,12 +35,12 @@ extern "C" fn f3_3(..., x: isize) {}
|
|||||||
|
|
||||||
const extern "C" fn f4_2(x: isize, ...) {}
|
const extern "C" fn f4_2(x: isize, ...) {}
|
||||||
//~^ ERROR functions cannot be both `const` and C-variadic
|
//~^ ERROR functions cannot be both `const` and C-variadic
|
||||||
//~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~| ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
|
//~| ERROR destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
|
||||||
|
|
||||||
const extern "C" fn f4_3(..., x: isize, ...) {}
|
const extern "C" fn f4_3(..., x: isize, ...) {}
|
||||||
//~^ ERROR functions cannot be both `const` and C-variadic
|
//~^ ERROR functions cannot be both `const` and C-variadic
|
||||||
//~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~| ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -52,34 +52,34 @@ extern "C" fn f3_3(..., x: isize) {}
|
|||||||
|
|
||||||
impl X {
|
impl X {
|
||||||
fn i_f1(x: isize, ...) {}
|
fn i_f1(x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
fn i_f2(...) {}
|
fn i_f2(...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
fn i_f3(..., x: isize, ...) {}
|
fn i_f3(..., x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
fn i_f4(..., x: isize, ...) {}
|
fn i_f4(..., x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
const fn i_f5(x: isize, ...) {}
|
const fn i_f5(x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR functions cannot be both `const` and C-variadic
|
//~| ERROR functions cannot be both `const` and C-variadic
|
||||||
//~| ERROR destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
|
//~| ERROR destructor of `VaListImpl<'_>` cannot be evaluated at compile-time
|
||||||
}
|
}
|
||||||
|
|
||||||
trait T {
|
trait T {
|
||||||
fn t_f1(x: isize, ...) {}
|
fn t_f1(x: isize, ...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
fn t_f2(x: isize, ...);
|
fn t_f2(x: isize, ...);
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
fn t_f3(...) {}
|
fn t_f3(...) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
fn t_f4(...);
|
fn t_f4(...);
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
fn t_f5(..., x: isize) {}
|
fn t_f5(..., x: isize) {}
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
fn t_f6(..., x: isize);
|
fn t_f6(..., x: isize);
|
||||||
//~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
|
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
//~| ERROR `...` must be the last argument of a C-variadic function
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:6:19
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:6:19
|
||||||
|
|
|
|
||||||
LL | fn f1_1(x: isize, ...) {}
|
LL | fn f1_1(x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9
|
||||||
|
|
|
|
||||||
LL | fn f1_2(...) {}
|
LL | fn f1_2(...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:12:30
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:12:30
|
||||||
|
|
|
|
||||||
LL | extern "C" fn f2_1(x: isize, ...) {}
|
LL | extern "C" fn f2_1(x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:15:20
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:15:20
|
||||||
|
|
|
|
||||||
LL | extern "C" fn f2_2(...) {}
|
LL | extern "C" fn f2_2(...) {}
|
||||||
@ -28,19 +28,19 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | extern "C" fn f2_3(..., x: isize) {}
|
LL | extern "C" fn f2_3(..., x: isize) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:18:20
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:18:20
|
||||||
|
|
|
|
||||||
LL | extern "C" fn f2_3(..., x: isize) {}
|
LL | extern "C" fn f2_3(..., x: isize) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:22:30
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:22:30
|
||||||
|
|
|
|
||||||
LL | extern "C" fn f3_1(x: isize, ...) {}
|
LL | extern "C" fn f3_1(x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:25:20
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:25:20
|
||||||
|
|
|
|
||||||
LL | extern "C" fn f3_2(...) {}
|
LL | extern "C" fn f3_2(...) {}
|
||||||
@ -52,7 +52,7 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | extern "C" fn f3_3(..., x: isize) {}
|
LL | extern "C" fn f3_3(..., x: isize) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:28:20
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:28:20
|
||||||
|
|
|
|
||||||
LL | extern "C" fn f3_3(..., x: isize) {}
|
LL | extern "C" fn f3_3(..., x: isize) {}
|
||||||
@ -70,7 +70,7 @@ error: functions cannot be both `const` and C-variadic
|
|||||||
LL | const extern "C" fn f4_2(x: isize, ...) {}
|
LL | const extern "C" fn f4_2(x: isize, ...) {}
|
||||||
| ^^^^^ `const` because of this ^^^ C-variadic because of this
|
| ^^^^^ `const` because of this ^^^ C-variadic because of this
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
|
||||||
|
|
|
|
||||||
LL | const extern "C" fn f4_2(x: isize, ...) {}
|
LL | const extern "C" fn f4_2(x: isize, ...) {}
|
||||||
@ -91,7 +91,7 @@ LL | const extern "C" fn f4_3(..., x: isize, ...) {}
|
|||||||
| | C-variadic because of this
|
| | C-variadic because of this
|
||||||
| `const` because of this
|
| `const` because of this
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:41:26
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:41:26
|
||||||
|
|
|
|
||||||
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
|
LL | const extern "C" fn f4_3(..., x: isize, ...) {}
|
||||||
@ -103,13 +103,13 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | fn e_f2(..., x: isize);
|
LL | fn e_f2(..., x: isize);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:54:23
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:54:23
|
||||||
|
|
|
|
||||||
LL | fn i_f1(x: isize, ...) {}
|
LL | fn i_f1(x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:56:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:56:13
|
||||||
|
|
|
|
||||||
LL | fn i_f2(...) {}
|
LL | fn i_f2(...) {}
|
||||||
@ -121,7 +121,7 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | fn i_f3(..., x: isize, ...) {}
|
LL | fn i_f3(..., x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:58:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:58:13
|
||||||
|
|
|
|
||||||
LL | fn i_f3(..., x: isize, ...) {}
|
LL | fn i_f3(..., x: isize, ...) {}
|
||||||
@ -133,7 +133,7 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | fn i_f4(..., x: isize, ...) {}
|
LL | fn i_f4(..., x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13
|
||||||
|
|
|
|
||||||
LL | fn i_f4(..., x: isize, ...) {}
|
LL | fn i_f4(..., x: isize, ...) {}
|
||||||
@ -147,31 +147,31 @@ LL | const fn i_f5(x: isize, ...) {}
|
|||||||
| |
|
| |
|
||||||
| `const` because of this
|
| `const` because of this
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:64:29
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:64:29
|
||||||
|
|
|
|
||||||
LL | const fn i_f5(x: isize, ...) {}
|
LL | const fn i_f5(x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:71:23
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:71:23
|
||||||
|
|
|
|
||||||
LL | fn t_f1(x: isize, ...) {}
|
LL | fn t_f1(x: isize, ...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:73:23
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:73:23
|
||||||
|
|
|
|
||||||
LL | fn t_f2(x: isize, ...);
|
LL | fn t_f2(x: isize, ...);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:75:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:75:13
|
||||||
|
|
|
|
||||||
LL | fn t_f3(...) {}
|
LL | fn t_f3(...) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:77:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:77:13
|
||||||
|
|
|
|
||||||
LL | fn t_f4(...);
|
LL | fn t_f4(...);
|
||||||
@ -183,7 +183,7 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | fn t_f5(..., x: isize) {}
|
LL | fn t_f5(..., x: isize) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:79:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:79:13
|
||||||
|
|
|
|
||||||
LL | fn t_f5(..., x: isize) {}
|
LL | fn t_f5(..., x: isize) {}
|
||||||
@ -195,7 +195,7 @@ error: `...` must be the last argument of a C-variadic function
|
|||||||
LL | fn t_f6(..., x: isize);
|
LL | fn t_f6(..., x: isize);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign or `unsafe extern "C"` functions may be C-variadic
|
error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
--> $DIR/variadic-ffi-semantic-restrictions.rs:82:13
|
--> $DIR/variadic-ffi-semantic-restrictions.rs:82:13
|
||||||
|
|
|
|
||||||
LL | fn t_f6(..., x: isize);
|
LL | fn t_f6(..., x: isize);
|
||||||
|
Loading…
Reference in New Issue
Block a user