diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-07 17:27:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-07 17:27:29 +0100 |
| commit | 1a1f948deb2a08d678973cd958fdf82a149973a4 (patch) | |
| tree | e7341d471466a2a84604cd5663fda00571831797 /src/test/ui | |
| parent | 289c3a5f6e8813886d148b7c194c137b6ae29551 (diff) | |
| parent | 81f435dd37c5ec828b621d37ec15bf41a33ff89a (diff) | |
| download | rust-1a1f948deb2a08d678973cd958fdf82a149973a4.tar.gz rust-1a1f948deb2a08d678973cd958fdf82a149973a4.zip | |
Rollup merge of #69708 - estebank:tiny, r=petrochenkov
On mismatched delimiters, only point at empty blocks that are in the same line
We point at empty blocks when we have mismatched braces to detect cases where editors auto insert `}` after writing `{`. Gate this to only the case where the entire span is in the same line so we never point at explicitly empty blocks.
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/parser/mismatched-delim-brace-empty-block.stderr | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/test/ui/parser/mismatched-delim-brace-empty-block.stderr b/src/test/ui/parser/mismatched-delim-brace-empty-block.stderr index 311f1768d82..f1be5dc5ba7 100644 --- a/src/test/ui/parser/mismatched-delim-brace-empty-block.stderr +++ b/src/test/ui/parser/mismatched-delim-brace-empty-block.stderr @@ -1,14 +1,8 @@ error: unexpected closing delimiter: `}` --> $DIR/mismatched-delim-brace-empty-block.rs:5:1 | -LL | fn main() { - | ___________- -LL | | -LL | | } - | |_- this block is empty, you might have not meant to close it -LL | let _ = (); -LL | } - | ^ unexpected closing delimiter +LL | } + | ^ unexpected closing delimiter error: aborting due to previous error |
