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.
Rollup merge of rust-lang#62995 - estebank:issue-62973, r=varkor
Avoid ICE when suggestion span is at Eof Fix rust-lang#62973.
- Loading branch information
Showing
4 changed files
with
85 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// ignore-tidy-trailing-newlines | ||
// error-pattern: aborting due to 6 previous errors | ||
|
||
fn main() {} | ||
|
||
fn p() { match s { v, E { [) {) } | ||
|
||
|
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,61 @@ | ||
error: this file contains an un-closed delimiter | ||
--> $DIR/issue-62973.rs:8:2 | ||
| | ||
LL | fn p() { match s { v, E { [) {) } | ||
| - - un-closed delimiter | ||
| | | ||
| un-closed delimiter | ||
LL | | ||
LL | | ||
| ^ | ||
|
||
error: expected one of `,` or `}`, found `{` | ||
--> $DIR/issue-62973.rs:6:25 | ||
| | ||
LL | fn p() { match s { v, E { [) {) } | ||
| - ^ expected one of `,` or `}` here | ||
| | | ||
| while parsing this struct | ||
|
||
error: struct literals are not allowed here | ||
--> $DIR/issue-62973.rs:6:16 | ||
| | ||
LL | fn p() { match s { v, E { [) {) } | ||
| ________________^ | ||
LL | | | ||
LL | | | ||
| |_^ | ||
help: surround the struct literal with parentheses | ||
| | ||
LL | fn p() { match (s { v, E { [) {) } | ||
LL | | ||
LL | ) | ||
| | ||
|
||
error: expected one of `.`, `?`, `{`, or an operator, found `}` | ||
--> $DIR/issue-62973.rs:8:1 | ||
| | ||
LL | fn p() { match s { v, E { [) {) } | ||
| ----- while parsing this match expression | ||
LL | | ||
LL | | ||
| ^ expected one of `.`, `?`, `{`, or an operator here | ||
|
||
error: incorrect close delimiter: `)` | ||
--> $DIR/issue-62973.rs:6:28 | ||
| | ||
LL | fn p() { match s { v, E { [) {) } | ||
| -^ incorrect close delimiter | ||
| | | ||
| un-closed delimiter | ||
|
||
error: incorrect close delimiter: `)` | ||
--> $DIR/issue-62973.rs:6:31 | ||
| | ||
LL | fn p() { match s { v, E { [) {) } | ||
| -^ incorrect close delimiter | ||
| | | ||
| un-closed delimiter | ||
|
||
error: aborting due to 6 previous errors | ||
|
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