Fix test redux
This commit is contained in:
parent
864f6d180b
commit
ffb827aff3
5 changed files with 34 additions and 27 deletions
|
|
@ -17,16 +17,22 @@ extern {
|
|||
fn main() {
|
||||
unsafe {
|
||||
printf(::std::ptr::null(), 0f32);
|
||||
//~^ ERROR can't pass `f32` to variadic function, cast to `c_double` [E0617]
|
||||
//~^ ERROR can't pass `f32` to variadic function
|
||||
//~| HELP cast the value to `c_double`
|
||||
printf(::std::ptr::null(), 0i8);
|
||||
//~^ ERROR can't pass `i8` to variadic function, cast to `c_int` [E0617]
|
||||
//~^ ERROR can't pass `i8` to variadic function
|
||||
//~| HELP cast the value to `c_int`
|
||||
printf(::std::ptr::null(), 0i16);
|
||||
//~^ ERROR can't pass `i16` to variadic function, cast to `c_int` [E0617]
|
||||
//~^ ERROR can't pass `i16` to variadic function
|
||||
//~| HELP cast the value to `c_int`
|
||||
printf(::std::ptr::null(), 0u8);
|
||||
//~^ ERROR can't pass `u8` to variadic function, cast to `c_uint` [E0617]
|
||||
//~^ ERROR can't pass `u8` to variadic function
|
||||
//~| HELP cast the value to `c_uint`
|
||||
printf(::std::ptr::null(), 0u16);
|
||||
//~^ ERROR can't pass `u16` to variadic function, cast to `c_uint` [E0617]
|
||||
//~^ ERROR can't pass `u16` to variadic function
|
||||
//~| HELP cast the value to `c_uint`
|
||||
printf(::std::ptr::null(), printf);
|
||||
//~^ ERROR can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function, cast to `unsafe extern "C" fn(*const i8, ...)` [E0617]
|
||||
//~^ ERROR can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to variadic function
|
||||
//~| HELP cast the value to `unsafe extern "C" fn(*const i8, ...)`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ fn bar(_: *const u8) {}
|
|||
fn main() {
|
||||
unsafe {
|
||||
foo(0, bar);
|
||||
//~^ ERROR can't pass `fn(*const u8) {bar}` to variadic function, cast to `fn(*const u8)`
|
||||
//~^ ERROR can't pass `fn(*const u8) {bar}` to variadic function
|
||||
//~| HELP cast the value to `fn(*const u8)`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue