diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-01-22 08:35:21 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-01-22 15:46:51 -0800 |
| commit | ffb827aff3340f8e6e012fd4a302616ddcf855fa (patch) | |
| tree | b64cdb4b6c28329c5412d0a9ed788bb603f70697 /src/test/compile-fail | |
| parent | 864f6d180baf76365619a7fe76b6c8b87e5ead8f (diff) | |
Fix test redux
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/E0617.rs | 18 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-32201.rs | 3 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/test/compile-fail/E0617.rs b/src/test/compile-fail/E0617.rs index 7b769ff4ae2..9375fd9cade 100644 --- a/src/test/compile-fail/E0617.rs +++ b/src/test/compile-fail/E0617.rs @@ -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, ...)` } } diff --git a/src/test/compile-fail/issue-32201.rs b/src/test/compile-fail/issue-32201.rs index bcc53df68a3..bf9f8ecbc80 100644 --- a/src/test/compile-fail/issue-32201.rs +++ b/src/test/compile-fail/issue-32201.rs @@ -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)` } } |
