1 // ignore-tidy-linelength
4 fn printf(c: *const i8, ...);
9 printf(::std::ptr::null(), 0f32);
10 //~^ ERROR can't pass `f32` to variadic function
11 //~| HELP cast the value to `c_double`
12 printf(::std::ptr::null(), 0i8);
13 //~^ ERROR can't pass `i8` to variadic function
14 //~| HELP cast the value to `c_int`
15 printf(::std::ptr::null(), 0i16);
16 //~^ ERROR can't pass `i16` to variadic function
17 //~| HELP cast the value to `c_int`
18 printf(::std::ptr::null(), 0u8);
19 //~^ ERROR can't pass `u8` to variadic function
20 //~| HELP cast the value to `c_uint`
21 printf(::std::ptr::null(), 0u16);
22 //~^ ERROR can't pass `u16` to variadic function
23 //~| HELP cast the value to `c_uint`
24 printf(::std::ptr::null(), printf);
25 //~^ ERROR can't pass `for<'r> unsafe extern "C" fn(*const i8, std::ffi::VaList<'r>, ...) {printf}` to variadic function
26 //~| HELP cast the value to `for<'r> unsafe extern "C" fn(*const i8, std::ffi::VaList<'r>, ...)`