aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/items/mod.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-26 07:12:18 +0100
committerAleksey Kladov <[email protected]>2018-08-26 07:12:18 +0100
commita450142aca947b9364e498897f522f854f19781d (patch)
treef4ebe8f259582042bd251c595629599abcbe9524 /crates/libsyntax2/src/grammar/items/mod.rs
parenta48964c64de635f532874ede293d91df54e624d7 (diff)
fix stray curly
Diffstat (limited to 'crates/libsyntax2/src/grammar/items/mod.rs')
-rw-r--r--crates/libsyntax2/src/grammar/items/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs
index 32d0778c4..a285892df 100644
--- a/crates/libsyntax2/src/grammar/items/mod.rs
+++ b/crates/libsyntax2/src/grammar/items/mod.rs
@@ -43,7 +43,12 @@ pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool, flavor: ItemF
43 m.abandon(p); 43 m.abandon(p);
44 if p.at(L_CURLY) { 44 if p.at(L_CURLY) {
45 error_block(p, "expected an item"); 45 error_block(p, "expected an item");
46 } else if !p.at(EOF) && !(stop_on_r_curly && p.at(R_CURLY)) { 46 } else if p.at(R_CURLY) && !stop_on_r_curly {
47 let e = p.start();
48 p.error("unmatched `}`");
49 p.bump();
50 e.complete(p, ERROR);
51 } else if !p.at(EOF) && !p.at(R_CURLY) {
47 p.err_and_bump("expected an item"); 52 p.err_and_bump("expected an item");
48 } else { 53 } else {
49 p.error("expected an item"); 54 p.error("expected an item");