-
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.
parser will not give wrong help message for 'public'
- Loading branch information
1 parent
affe0d3
commit 863488d
Showing
8 changed files
with
79 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Checks what happens when `public` is used instead of the correct, `pub` | ||
// run-rustfix | ||
|
||
pub enum Test { | ||
//~^ ERROR expected one of `!` or `::`, found keyword `enum` | ||
//~^^ HELP write `pub` instead of `public` to make the item public | ||
A, | ||
B, | ||
} | ||
|
||
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,11 @@ | ||
// Checks what happens when `public` is used instead of the correct, `pub` | ||
// run-rustfix | ||
|
||
public enum Test { | ||
//~^ ERROR expected one of `!` or `::`, found keyword `enum` | ||
//~^^ HELP write `pub` instead of `public` to make the item public | ||
A, | ||
B, | ||
} | ||
|
||
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,13 @@ | ||
error: expected one of `!` or `::`, found keyword `enum` | ||
--> $DIR/public-instead-of-pub-1.rs:4:8 | ||
| | ||
LL | public enum Test { | ||
| ^^^^ expected one of `!` or `::` | ||
| | ||
help: write `pub` instead of `public` to make the item public | ||
| | ||
LL | pub enum Test { | ||
| ~~~ | ||
|
||
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,7 @@ | ||
// Checks what happens when `public` is used instead of the correct, `pub` | ||
// Won't give help message for this case | ||
|
||
public let x = 1; | ||
//~^ ERROR expected one of `!` or `::`, found keyword `let` | ||
|
||
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,8 @@ | ||
error: expected one of `!` or `::`, found keyword `let` | ||
--> $DIR/public-instead-of-pub-2.rs:4:8 | ||
| | ||
LL | public let x = 1; | ||
| ^^^ expected one of `!` or `::` | ||
|
||
error: aborting due to previous error | ||
|