-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recover some items that expect braces and don't take semicolons
- Loading branch information
1 parent
f3fafbb
commit 4d0d688
Showing
7 changed files
with
78 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;` | ||
struct Foo; | ||
impl Foo; //~ ERROR expected `{}`, found `;` | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;` | ||
--> $DIR/empty-impl-semicolon.rs:1:9 | ||
error: expected `{}`, found `;` | ||
--> $DIR/empty-impl-semicolon.rs:2:9 | ||
| | ||
LL | impl Foo; | ||
| ^ expected one of 8 possible tokens | ||
| ^ | ||
| | ||
= help: try using `{}` instead | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
trait Trait; | ||
//~^ ERROR expected `{}`, found `;` | ||
|
||
impl Trait for (); | ||
//~^ ERROR expected `{}`, found `;` | ||
|
||
enum Enum; | ||
//~^ ERROR expected `{}`, found `;` | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: expected `{}`, found `;` | ||
--> $DIR/item-needs-block.rs:1:12 | ||
| | ||
LL | trait Trait; | ||
| ^ | ||
| | ||
= help: try using `{}` instead | ||
|
||
error: expected `{}`, found `;` | ||
--> $DIR/item-needs-block.rs:4:18 | ||
| | ||
LL | impl Trait for (); | ||
| ^ | ||
| | ||
= help: try using `{}` instead | ||
|
||
error: expected `{}`, found `;` | ||
--> $DIR/item-needs-block.rs:7:10 | ||
| | ||
LL | enum Enum; | ||
| ^ | ||
| | ||
= help: try using `{}` instead | ||
|
||
error: aborting due to 3 previous errors | ||
|