-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recover from missing param list in function definitions
- Loading branch information
Showing
8 changed files
with
57 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// run-rustfix | ||
|
||
pub fn missing() -> () {} | ||
//~^ ERROR missing parameters for function definition | ||
|
||
pub fn missing2() {} | ||
//~^ ERROR missing parameters for function definition | ||
|
||
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,9 @@ | ||
// run-rustfix | ||
|
||
pub fn missing -> () {} | ||
//~^ ERROR missing parameters for function definition | ||
|
||
pub fn missing2 {} | ||
//~^ ERROR missing parameters for function definition | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/parser/issues/issue-108109-fn-missing-params.stderr
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,14 @@ | ||
error: missing parameters for function definition | ||
--> $DIR/issue-108109-fn-missing-params.rs:3:15 | ||
| | ||
LL | pub fn missing -> () {} | ||
| ^ help: add a parameter list | ||
|
||
error: missing parameters for function definition | ||
--> $DIR/issue-108109-fn-missing-params.rs:6:16 | ||
| | ||
LL | pub fn missing2 {} | ||
| ^ help: add a parameter list | ||
|
||
error: aborting due to 2 previous errors | ||
|