Optional patterns in trait methods

This commit is contained in:
Aleksey Kladov 2018-08-13 18:40:47 +03:00
parent c146331b1c
commit 7d0c9cf546
4 changed files with 92 additions and 144 deletions

View file

@ -284,7 +284,7 @@ pub(super) fn block_expr(p: &mut Parser) -> CompletedMarker {
// test block_items
// fn a() { fn b() {} }
let m = p.start();
match items::maybe_item(p) {
match items::maybe_item(p, items::ItemFlavor::Mod) {
items::MaybeItem::Item(kind) => {
m.complete(p, kind);
}