From ef462ed6af7ae8e0d30894baefe6ba1ff49aab8f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 18:28:23 +0200 Subject: Better recovery in `use foo::;` --- crates/parser/src/grammar/items.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'crates/parser') diff --git a/crates/parser/src/grammar/items.rs b/crates/parser/src/grammar/items.rs index b2f7cc21f..8fd8f3b80 100644 --- a/crates/parser/src/grammar/items.rs +++ b/crates/parser/src/grammar/items.rs @@ -27,8 +27,20 @@ pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) { } pub(super) const ITEM_RECOVERY_SET: TokenSet = token_set![ - FN_KW, STRUCT_KW, ENUM_KW, IMPL_KW, TRAIT_KW, CONST_KW, STATIC_KW, LET_KW, MOD_KW, PUB_KW, - CRATE_KW, USE_KW, MACRO_KW + FN_KW, + STRUCT_KW, + ENUM_KW, + IMPL_KW, + TRAIT_KW, + CONST_KW, + STATIC_KW, + LET_KW, + MOD_KW, + PUB_KW, + CRATE_KW, + USE_KW, + MACRO_KW, + T![;], ]; pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool) { -- cgit v1.2.3