about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-01-21 19:19:07 -0800
committerEsteban Küber <esteban@kuber.com.ar>2018-01-22 15:46:50 -0800
commite76d3f62cc34a77496305639f22a7da168ebc301 (patch)
tree13fe021c958e778c157dfd9ee8fd1bb7e36b5f73
parentfdfb9a2963952f19d9f66a8e50981478fe2bca48 (diff)
downloadrust-e76d3f62cc34a77496305639f22a7da168ebc301.tar.gz
rust-e76d3f62cc34a77496305639f22a7da168ebc301.zip
Fix test for variadic error change
-rw-r--r--src/librustc/session/config.rs2
-rw-r--r--src/test/ui/variadic-ffi-3.stderr24
2 files changed, 13 insertions, 13 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index e30a43d3d1a..4d54f2a3677 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1626,7 +1626,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
     }
 
     if !debugging_opts.unstable_options && debugging_opts.explain {
-        early_error(ErrorOutputType::Json(false), "-Z --explain is unstable");
+        early_error(error_format, "-Z --explain is unstable");
     }
 
     let mut output_types = BTreeMap::new();
diff --git a/src/test/ui/variadic-ffi-3.stderr b/src/test/ui/variadic-ffi-3.stderr
index be158c1e398..1bf3798b95a 100644
--- a/src/test/ui/variadic-ffi-3.stderr
+++ b/src/test/ui/variadic-ffi-3.stderr
@@ -34,41 +34,41 @@ error[E0308]: mismatched types
    = note: expected type `extern "C" fn(isize, u8, ...)`
               found type `extern "C" fn(isize, u8) {bar}`
 
-error[E0617]: can't pass `f32` to variadic function, cast to `c_double`
+error[E0617]: can't pass `f32` to variadic function
   --> $DIR/variadic-ffi-3.rs:34:19
    |
 34 |         foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function, cast to `c_double`
-   |                   ^^^^
+   |                   ^^^^ help: cast the value to `c_double`: `3f32 as c_double`
 
-error[E0617]: can't pass `bool` to variadic function, cast to `c_int`
+error[E0617]: can't pass `bool` to variadic function
   --> $DIR/variadic-ffi-3.rs:35:19
    |
 35 |         foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function, cast to `c_int`
-   |                   ^^^^
+   |                   ^^^^ help: cast the value to `c_int`: `true as c_int`
 
-error[E0617]: can't pass `i8` to variadic function, cast to `c_int`
+error[E0617]: can't pass `i8` to variadic function
   --> $DIR/variadic-ffi-3.rs:36:19
    |
 36 |         foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function, cast to `c_int`
-   |                   ^^^
+   |                   ^^^ help: cast the value to `c_int`: `1i8 as c_int`
 
-error[E0617]: can't pass `u8` to variadic function, cast to `c_uint`
+error[E0617]: can't pass `u8` to variadic function
   --> $DIR/variadic-ffi-3.rs:37:19
    |
 37 |         foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function, cast to `c_uint`
-   |                   ^^^
+   |                   ^^^ help: cast the value to `c_uint`: `1u8 as c_uint`
 
-error[E0617]: can't pass `i16` to variadic function, cast to `c_int`
+error[E0617]: can't pass `i16` to variadic function
   --> $DIR/variadic-ffi-3.rs:38:19
    |
 38 |         foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function, cast to `c_int`
-   |                   ^^^^
+   |                   ^^^^ help: cast the value to `c_int`: `1i16 as c_int`
 
-error[E0617]: can't pass `u16` to variadic function, cast to `c_uint`
+error[E0617]: can't pass `u16` to variadic function
   --> $DIR/variadic-ffi-3.rs:39:19
    |
 39 |         foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function, cast to `c_uint`
-   |                   ^^^^
+   |                   ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint`
 
 error: aborting due to 10 previous errors