Tweak tests to avoid confusing suggestion output
This commit is contained in:
parent
c2b3287483
commit
dd40e0b4ee
6 changed files with 12 additions and 12 deletions
|
@ -1,7 +1,10 @@
|
|||
enum Foo {
|
||||
enum Bar { Baz }, //~ ERROR `enum` definition cannot be nested inside `enum`
|
||||
struct Quux { field: u8 }, //~ ERROR `struct` definition cannot be nested inside `enum`
|
||||
union Wibble { field: u8 }, //~ ERROR `union` definition cannot be nested inside `enum`
|
||||
enum Bar { Baz },
|
||||
//~^ ERROR `enum` definition cannot be nested inside `enum`
|
||||
struct Quux { field: u8 },
|
||||
//~^ ERROR `struct` definition cannot be nested inside `enum`
|
||||
union Wibble { field: u8 },
|
||||
//~^ ERROR `union` definition cannot be nested inside `enum`
|
||||
Bat,
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,10 @@ LL | enum Bar { Baz },
|
|||
help: consider creating a new `enum` definition instead of nesting
|
||||
|
|
||||
LL - enum Bar { Baz },
|
||||
LL +
|
||||
|
|
||||
|
||||
error: `struct` definition cannot be nested inside `enum`
|
||||
--> $DIR/nested-enum.rs:3:5
|
||||
--> $DIR/nested-enum.rs:4:5
|
||||
|
|
||||
LL | struct Quux { field: u8 },
|
||||
| ^^^^^^
|
||||
|
@ -19,11 +18,10 @@ LL | struct Quux { field: u8 },
|
|||
help: consider creating a new `struct` definition instead of nesting
|
||||
|
|
||||
LL - struct Quux { field: u8 },
|
||||
LL +
|
||||
|
|
||||
|
||||
error: `union` definition cannot be nested inside `enum`
|
||||
--> $DIR/nested-enum.rs:4:5
|
||||
--> $DIR/nested-enum.rs:6:5
|
||||
|
|
||||
LL | union Wibble { field: u8 },
|
||||
| ^^^^^
|
||||
|
@ -31,7 +29,6 @@ LL | union Wibble { field: u8 },
|
|||
help: consider creating a new `union` definition instead of nesting
|
||||
|
|
||||
LL - union Wibble { field: u8 },
|
||||
LL +
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
// Tests that we do not erroneously emit an error about
|
||||
// missing main function when the mod starts with a `;`
|
||||
|
||||
; //~ ERROR expected item, found `;`
|
||||
;
|
||||
//~^ ERROR expected item, found `;`
|
||||
fn main() { }
|
||||
|
|
|
@ -7,7 +7,6 @@ LL | ;
|
|||
help: remove this semicolon
|
||||
|
|
||||
LL - ;
|
||||
LL +
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
// Tests that we still emit an error after an item.
|
||||
|
||||
fn main() { }
|
||||
; //~ ERROR expected item, found `;`
|
||||
;
|
||||
//~^ ERROR expected item, found `;`
|
||||
|
|
|
@ -8,7 +8,6 @@ LL | ;
|
|||
help: remove this semicolon
|
||||
|
|
||||
LL - ;
|
||||
LL +
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue