fix assertione error on block parsing

This commit is contained in:
Aleksey Kladov
2018-08-25 13:21:43 +03:00
parent fed5727ea2
commit 838820ad98
4 changed files with 9 additions and 10 deletions

View File

@@ -252,10 +252,10 @@ fn function(p: &mut Parser, flavor: ItemFlavor) {
// test fn_decl
// trait T { fn foo(); }
if p.at(L_CURLY) {
expressions::block(p);
if p.at(SEMI) {
p.bump();
} else {
p.expect(SEMI);
expressions::block(p)
}
}