forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#127419 - trevyn:issue-125446, r=fee1-dead
Add suggestions for possible missing `fn`, `struct`, or `enum` keywords Closes rust-lang#125446 Closes rust-lang#65381
- Loading branch information
Showing
42 changed files
with
309 additions
and
147 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
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,13 +1,13 @@ | ||
error: missing `struct` for struct definition | ||
--> $DIR/recovered-block.rs:11:8 | ||
error: missing `enum` for enum definition | ||
--> $DIR/recovered-block.rs:11:5 | ||
| | ||
LL | pub Foo { text } | ||
| ^ | ||
| ^^^^^^^ | ||
| | ||
help: add `struct` here to parse `Foo` as a public struct | ||
help: add `enum` here to parse `Foo` as an enum | ||
| | ||
LL | pub struct Foo { text } | ||
| ++++++ | ||
LL | pub enum Foo { text } | ||
| ++++ | ||
|
||
error: aborting due to 1 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
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,12 +1,18 @@ | ||
error: expected one of `!` or `::`, found `(` | ||
--> $DIR/extern-no-fn.rs:2:6 | ||
error: missing `fn` or `struct` for function or struct definition | ||
--> $DIR/extern-no-fn.rs:2:5 | ||
| | ||
LL | extern "C" { | ||
| - while parsing this item list starting here | ||
LL | f(); | ||
| ^ expected one of `!` or `::` | ||
| ^ | ||
... | ||
LL | } | ||
| - the item list ends here | ||
| | ||
help: if you meant to call a macro, try | ||
| | ||
LL | f!(); | ||
| ~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
Oops, something went wrong.