about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorwangxiangqing <wangxiangqing@bytedance.com>2019-10-13 12:59:23 +0800
committerwangxiangqing <wangxiangqing@bytedance.com>2019-10-13 14:21:46 +0800
commit888d0ba8df38681c08ac25f30ff4cbfad8168d90 (patch)
treeb5f0015e8449a74f163bf9f602e2904405334f98 /src/libsyntax/parse
parente6ce3ef80aad6df7e9971d126bb22619ab34927e (diff)
downloadrust-888d0ba8df38681c08ac25f30ff4cbfad8168d90.tar.gz
rust-888d0ba8df38681c08ac25f30ff4cbfad8168d90.zip
Collect occurrences of for mismatched braces diagnostic
Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/tokentrees.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/tokentrees.rs b/src/libsyntax/parse/lexer/tokentrees.rs
index fa494db2f9f..b088d160b92 100644
--- a/src/libsyntax/parse/lexer/tokentrees.rs
+++ b/src/libsyntax/parse/lexer/tokentrees.rs
@@ -212,7 +212,10 @@ impl<'a> TokenTreesReader<'a> {
                     .struct_span_err(self.token.span, &msg);
 
                 if let Some(span) = self.last_delim_empty_block_spans.remove(&delim) {
-                    err.span_label(span, "this block is empty, you might have not meant to close it");
+                    err.span_label(
+                        span,
+                        "this block is empty, you might have not meant to close it"
+                    );
                 }
                 err.span_label(self.token.span, "unexpected close delimiter");
                 Err(err)