-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recover more expressions in patterns
- Loading branch information
Showing
20 changed files
with
561 additions
and
287 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
//@ error-pattern: expected | ||
|
||
fn main() { | ||
let x.y::<isize>.z foo; | ||
//~^ error: field expressions cannot have generic arguments | ||
//~| error: expected a pattern, found an expression | ||
//~| error: expected one of `(`, `.`, `::`, `:`, `;`, `=`, `?`, `|`, or an operator, found `foo` | ||
} |
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,20 @@ | ||
error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` | ||
--> $DIR/bad-name.rs:4:8 | ||
error: field expressions cannot have generic arguments | ||
--> $DIR/bad-name.rs:2:12 | ||
| | ||
LL | let x.y::<isize>.z foo; | ||
| ^ expected one of `:`, `;`, `=`, `@`, or `|` | ||
| ^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
error: expected a pattern, found an expression | ||
--> $DIR/bad-name.rs:2:7 | ||
| | ||
LL | let x.y::<isize>.z foo; | ||
| ^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns | ||
|
||
error: expected one of `(`, `.`, `::`, `:`, `;`, `=`, `?`, `|`, or an operator, found `foo` | ||
--> $DIR/bad-name.rs:2:22 | ||
| | ||
LL | let x.y::<isize>.z foo; | ||
| ^^^ expected one of 9 possible tokens | ||
|
||
error: aborting due to 3 previous errors | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.