Skip to content

Commit e76d3f6

Browse files
committed
Fix test for variadic error change
1 parent fdfb9a2 commit e76d3f6

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/librustc/session/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
16261626
}
16271627

16281628
if !debugging_opts.unstable_options && debugging_opts.explain {
1629-
early_error(ErrorOutputType::Json(false), "-Z --explain is unstable");
1629+
early_error(error_format, "-Z --explain is unstable");
16301630
}
16311631

16321632
let mut output_types = BTreeMap::new();

src/test/ui/variadic-ffi-3.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,41 +34,41 @@ error[E0308]: mismatched types
3434
= note: expected type `extern "C" fn(isize, u8, ...)`
3535
found type `extern "C" fn(isize, u8) {bar}`
3636

37-
error[E0617]: can't pass `f32` to variadic function, cast to `c_double`
37+
error[E0617]: can't pass `f32` to variadic function
3838
--> $DIR/variadic-ffi-3.rs:34:19
3939
|
4040
34 | foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function, cast to `c_double`
41-
| ^^^^
41+
| ^^^^ help: cast the value to `c_double`: `3f32 as c_double`
4242

43-
error[E0617]: can't pass `bool` to variadic function, cast to `c_int`
43+
error[E0617]: can't pass `bool` to variadic function
4444
--> $DIR/variadic-ffi-3.rs:35:19
4545
|
4646
35 | foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function, cast to `c_int`
47-
| ^^^^
47+
| ^^^^ help: cast the value to `c_int`: `true as c_int`
4848

49-
error[E0617]: can't pass `i8` to variadic function, cast to `c_int`
49+
error[E0617]: can't pass `i8` to variadic function
5050
--> $DIR/variadic-ffi-3.rs:36:19
5151
|
5252
36 | foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function, cast to `c_int`
53-
| ^^^
53+
| ^^^ help: cast the value to `c_int`: `1i8 as c_int`
5454

55-
error[E0617]: can't pass `u8` to variadic function, cast to `c_uint`
55+
error[E0617]: can't pass `u8` to variadic function
5656
--> $DIR/variadic-ffi-3.rs:37:19
5757
|
5858
37 | foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function, cast to `c_uint`
59-
| ^^^
59+
| ^^^ help: cast the value to `c_uint`: `1u8 as c_uint`
6060

61-
error[E0617]: can't pass `i16` to variadic function, cast to `c_int`
61+
error[E0617]: can't pass `i16` to variadic function
6262
--> $DIR/variadic-ffi-3.rs:38:19
6363
|
6464
38 | foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function, cast to `c_int`
65-
| ^^^^
65+
| ^^^^ help: cast the value to `c_int`: `1i16 as c_int`
6666

67-
error[E0617]: can't pass `u16` to variadic function, cast to `c_uint`
67+
error[E0617]: can't pass `u16` to variadic function
6868
--> $DIR/variadic-ffi-3.rs:39:19
6969
|
7070
39 | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function, cast to `c_uint`
71-
| ^^^^
71+
| ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint`
7272

7373
error: aborting due to 10 previous errors
7474

0 commit comments

Comments
 (0)