diff options
author | Aleksey Kladov <[email protected]> | 2018-08-25 11:21:43 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-25 11:21:43 +0100 |
commit | 838820ad986e04dffa43fc2662a58da27d97db06 (patch) | |
tree | 4bd77e98865c781d73a2beec795e42acbcd8ba0f /crates/libsyntax2/src/grammar/items | |
parent | fed5727ea2669712e5d85502767b5c150203ecfc (diff) |
fix assertione error on block parsing
Diffstat (limited to 'crates/libsyntax2/src/grammar/items')
-rw-r--r-- | crates/libsyntax2/src/grammar/items/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index 44ab92c63..32d0778c4 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs | |||
@@ -252,10 +252,10 @@ fn function(p: &mut Parser, flavor: ItemFlavor) { | |||
252 | 252 | ||
253 | // test fn_decl | 253 | // test fn_decl |
254 | // trait T { fn foo(); } | 254 | // trait T { fn foo(); } |
255 | if p.at(L_CURLY) { | 255 | if p.at(SEMI) { |
256 | expressions::block(p); | 256 | p.bump(); |
257 | } else { | 257 | } else { |
258 | p.expect(SEMI); | 258 | expressions::block(p) |
259 | } | 259 | } |
260 | } | 260 | } |
261 | 261 | ||