Skip to content

Commit e00264d

Browse files
bonziniBennoLossin
authored andcommitted
tests: update output for compile-fail tests
Some of the error messages have changed in nightly Rust, since the .stderr files were last checked. Update everything. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 4ba806f commit e00264d

10 files changed

Lines changed: 17 additions & 22 deletions

tests/ui/compile-fail/init/missing_comma.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: no rules expected the token `c`
1+
error: no rules expected `c`
22
--> tests/ui/compile-fail/init/missing_comma.rs:16:9
33
|
44
16 | c: Bar,
@@ -10,7 +10,7 @@ note: while trying to match `,`
1010
| @munch_fields($field:ident $(: $val:expr)?, $($rest:tt)*),
1111
| ^
1212

13-
error: no rules expected the token `c`
13+
error: no rules expected `c`
1414
--> tests/ui/compile-fail/init/missing_comma.rs:16:9
1515
|
1616
16 | c: Bar,

tests/ui/compile-fail/init/missing_comma_with_zeroable.stderr

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
error[E0782]: trait objects must include the `dyn` keyword
1+
error[E0782]: expected a type, found a trait
22
--> tests/ui/compile-fail/init/missing_comma_with_zeroable.rs:12:15
33
|
44
12 | a: 0..Zeroable::zeroed()
55
| ^^^^^^^^
66
|
7-
help: add `dyn` keyword before this trait
7+
help: you can add the `dyn` keyword if you want a trait object
88
|
99
12 | a: 0..<dyn Zeroable>::zeroed()
1010
| ++++ +
1111

12-
error[E0599]: no function or associated item named `zeroed` found for trait `pinned_init::Zeroable`
13-
--> tests/ui/compile-fail/init/missing_comma_with_zeroable.rs:12:25
14-
|
15-
12 | a: 0..Zeroable::zeroed()
16-
| ^^^^^^ function or associated item not found in `Zeroable`
17-
1812
error[E0308]: mismatched types
1913
--> tests/ui/compile-fail/init/missing_comma_with_zeroable.rs:11:13
2014
|

tests/ui/compile-fail/init/no_error_coercion.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error[E0277]: `?` couldn't convert the error to `std::alloc::AllocError`
55
17 | | a: Box::new(42),
66
18 | | bar <- init!(Bar { b: 42 }),
77
19 | | }? AllocError)
8-
| |______________________^ the trait `From<Infallible>` is not implemented for `std::alloc::AllocError`, which is required by `Result<Foo::new::__InitOk, std::alloc::AllocError>: FromResidual<Result<Infallible, Infallible>>`
8+
| |______________________^ the trait `From<Infallible>` is not implemented for `std::alloc::AllocError`
99
|
1010
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
1111
= help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`

tests/ui/compile-fail/init/wrong_generics.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: no rules expected the token `<`
1+
error: no rules expected `<`
22
--> tests/ui/compile-fail/init/wrong_generics.rs:7:22
33
|
44
7 | let _ = init!(Foo<()> {

tests/ui/compile-fail/pin_data/missing_pin.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ error[E0277]: the trait bound `impl PinInit<usize>: Init<usize, _>` is not satis
77
13 | | })
88
| |__________^ the trait `Init<usize, _>` is not implemented for `impl PinInit<usize>`
99
|
10-
= help: the trait `Init<impl PinInit<usize>, _>` is implemented for `impl PinInit<usize>`
10+
= help: the trait `Init<usize, _>` is not implemented for `impl PinInit<usize>`
11+
but trait `Init<impl PinInit<usize>, _>` is implemented for it
1112
= help: for that trait implementation, expected `impl PinInit<usize>`, found `usize`
1213
note: required by a bound in `__ThePinData::a`
1314
--> tests/ui/compile-fail/pin_data/missing_pin.rs:4:1

tests/ui/compile-fail/pin_data/unexpected_item.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: no rules expected the token `fn`
1+
error: no rules expected keyword `fn`
22
--> tests/ui/compile-fail/pin_data/unexpected_item.rs:4:1
33
|
44
4 | fn foo() {}
55
| ^^ no rules expected this token in macro call
66
|
7-
note: while trying to match `struct`
7+
note: while trying to match keyword `struct`
88
--> src/macros.rs
99
|
1010
| $vis:vis struct $name:ident

tests/ui/compile-fail/pinned_drop/no_fn.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: no rules expected the token `)`
1+
error: no rules expected `)`
22
--> tests/ui/compile-fail/pinned_drop/no_fn.rs:6:1
33
|
44
6 | #[pinned_drop]
55
| ^^^^^^^^^^^^^^ no rules expected this token in macro call
66
|
7-
note: while trying to match `fn`
7+
note: while trying to match keyword `fn`
88
--> src/macros.rs
99
|
1010
| fn drop($($sig:tt)*) {

tests/ui/compile-fail/pinned_drop/unexpected_additional_item.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: no rules expected the token `const`
1+
error: no rules expected keyword `const`
22
--> tests/ui/compile-fail/pinned_drop/unexpected_additional_item.rs:10:5
33
|
44
10 | const BAZ: usize = 0;

tests/ui/compile-fail/pinned_drop/unexpected_item.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: no rules expected the token `const`
1+
error: no rules expected keyword `const`
22
--> tests/ui/compile-fail/pinned_drop/unexpected_item.rs:8:5
33
|
44
8 | const BAZ: usize = 0;
55
| ^^^^^ no rules expected this token in macro call
66
|
7-
note: while trying to match `fn`
7+
note: while trying to match keyword `fn`
88
--> src/macros.rs
99
|
1010
| fn drop($($sig:tt)*) {

tests/ui/compile-fail/zeroable/with_comma.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: no rules expected the token `,`
1+
error: no rules expected `,`
22
--> tests/ui/compile-fail/zeroable/with_comma.rs:11:13
33
|
44
11 | let _ = init!(Foo {
@@ -15,7 +15,7 @@ note: while trying to match `)`
1515
| ^
1616
= note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `init` (in Nightly builds, run with -Z macro-backtrace for more info)
1717

18-
error: no rules expected the token `,`
18+
error: no rules expected `,`
1919
--> tests/ui/compile-fail/zeroable/with_comma.rs:11:13
2020
|
2121
11 | let _ = init!(Foo {

0 commit comments

Comments
 (0)