Skip to content

Commit

Permalink
Collect occurrences of for mismatched braces diagnostic
Browse files Browse the repository at this point in the history
Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
  • Loading branch information
XiangQingW committed Oct 13, 2019
1 parent e6ce3ef commit 888d0ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libsyntax/parse/lexer/tokentrees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 888d0ba

Please sign in to comment.