-
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.
Collect occurrences of for mismatched braces diagnostic
Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
- Loading branch information
1 parent
888d0ba
commit fe819a0
Showing
3 changed files
with
13 additions
and
8 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
fn main() {} | ||
fn main() { | ||
|
||
} | ||
let _ = (); | ||
} //~ ERROR unexpected close delimiter |
15 changes: 9 additions & 6 deletions
15
src/test/ui/parser/mismatched-delim-brace-empty-block.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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
error: unexpected close delimiter: `}` | ||
--> $DIR/mismatched-delim-brace-empty-block.rs:3:1 | ||
--> $DIR/mismatched-delim-brace-empty-block.rs:5:1 | ||
| | ||
LL | fn main() {} | ||
| -- this block is empty, you might have not meant to close it | ||
LL | let _ = (); | ||
LL | } | ||
| ^ unexpected close delimiter | ||
LL | fn main() { | ||
| ___________- | ||
LL | | | ||
LL | | } | ||
| |_- this block is empty, you might have not meant to close it | ||
LL | let _ = (); | ||
LL | } | ||
| ^ unexpected close delimiter | ||
|
||
error: aborting due to previous error | ||
|