1
Fork 0

Make parse error suggestions verbose and fix spans

Go over all structured parser suggestions and make them verbose style.

When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
This commit is contained in:
Esteban Küber 2024-07-06 03:07:46 +00:00
parent 5e311f933d
commit 692bc344d5
175 changed files with 3197 additions and 786 deletions

View file

@ -2,25 +2,37 @@ error: `enum` definition cannot be nested inside `enum`
--> $DIR/nested-enum.rs:2:5
|
LL | enum Bar { Baz },
| ^^^^------------
| |
| help: consider creating a new `enum` definition instead of nesting
| ^^^^
|
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
|
LL | struct Quux { field: u8 },
| ^^^^^^-------------------
| |
| help: consider creating a new `struct` definition instead of nesting
| ^^^^^^
|
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
|
LL | union Wibble { field: u8 },
| ^^^^^---------------------
| |
| help: consider creating a new `union` definition instead of nesting
| ^^^^^
|
help: consider creating a new `union` definition instead of nesting
|
LL - union Wibble { field: u8 },
LL +
|
error: aborting due to 3 previous errors