about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-07 17:27:29 +0100
committerGitHub <noreply@github.com>2020-03-07 17:27:29 +0100
commit1a1f948deb2a08d678973cd958fdf82a149973a4 (patch)
treee7341d471466a2a84604cd5663fda00571831797 /src/test/ui
parent289c3a5f6e8813886d148b7c194c137b6ae29551 (diff)
parent81f435dd37c5ec828b621d37ec15bf41a33ff89a (diff)
downloadrust-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.stderr10
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