-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add Suggestions for Misspelled Keywords #129899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,6 @@ | ||
trait Animal { | ||
Type Result = u8; | ||
//~^ ERROR expected one of | ||
} | ||
|
||
fn main() {} |
This file contains hidden or 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,18 @@ | ||
error: expected one of `!` or `::`, found `Result` | ||
--> $DIR/assoc-type.rs:2:10 | ||
| | ||
LL | trait Animal { | ||
| - while parsing this item list starting here | ||
LL | Type Result = u8; | ||
| ^^^^^^ expected one of `!` or `::` | ||
LL | | ||
LL | } | ||
| - the item list ends here | ||
| | ||
help: write keyword `type` in lowercase | ||
| | ||
LL | type Result = u8; | ||
| ~~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains hidden or 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,6 @@ | ||
//@ edition: 2018 | ||
|
||
fn main() { | ||
async Move {} | ||
//~^ ERROR expected one of | ||
} |
This file contains hidden or 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 `move`, `|`, or `||`, found `Move` | ||
--> $DIR/async-move.rs:4:11 | ||
| | ||
LL | async Move {} | ||
| ^^^^ expected one of `move`, `|`, or `||` | ||
| | ||
help: write keyword `move` in lowercase | ||
| | ||
LL | async move {} | ||
| ~~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains hidden or 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,5 @@ | ||
cnst fn code() {} | ||
//~^ ERROR expected one of | ||
|
||
fn main() { | ||
} |
This file contains hidden or 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 `fn` | ||
--> $DIR/const-fn.rs:1:6 | ||
| | ||
LL | cnst fn code() {} | ||
| ^^ expected one of `!` or `::` | ||
| | ||
help: there is a keyword `const` with a similar name | ||
| | ||
LL | const fn code() {} | ||
| ~~~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains hidden or 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,4 @@ | ||
fn foo<consta N: usize>(_arr: [i32; N]) {} | ||
//~^ ERROR expected one of | ||
|
||
fn main() {} |
This file contains hidden or 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 `N` | ||
--> $DIR/const-generics.rs:1:15 | ||
| | ||
LL | fn foo<consta N: usize>(_arr: [i32; N]) {} | ||
| ^ expected one of `,`, `:`, `=`, or `>` | ||
| | ||
help: there is a keyword `const` with a similar name | ||
| | ||
LL | fn foo<const N: usize>(_arr: [i32; N]) {} | ||
| ~~~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains hidden or 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,4 @@ | ||
cons A: u8 = 10; | ||
//~^ ERROR expected one of | ||
|
||
fn main() {} |
This file contains hidden or 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 `A` | ||
--> $DIR/const.rs:1:6 | ||
| | ||
LL | cons A: u8 = 10; | ||
| ^ expected one of `!` or `::` | ||
| | ||
help: there is a keyword `const` with a similar name | ||
| | ||
LL | const A: u8 = 10; | ||
| ~~~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains hidden or 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,4 @@ | ||
fn main() { | ||
form i in 1..10 {} | ||
//~^ ERROR expected one of | ||
} |
This file contains hidden or 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 an operator, found `i` | ||
--> $DIR/for-loop.rs:2:10 | ||
| | ||
LL | form i in 1..10 {} | ||
| ^ expected one of 8 possible tokens | ||
| | ||
help: there is a keyword `for` with a similar name | ||
| | ||
LL | for i in 1..10 {} | ||
| ~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.