From 55ebe449c98a2e96e677e68b54b5c0e5496bc534 Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Thu, 20 Dec 2018 19:46:03 +0000 Subject: Fix parsing of contextual_keyword union --- crates/ra_syntax/src/grammar/items.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/grammar/items.rs b/crates/ra_syntax/src/grammar/items.rs index b646dd070..aa5fe0777 100644 --- a/crates/ra_syntax/src/grammar/items.rs +++ b/crates/ra_syntax/src/grammar/items.rs @@ -202,7 +202,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option { } STRUCT_DEF } - IDENT if p.at_contextual_kw("union") => { + IDENT if p.at_contextual_kw("union") && p.nth(1) == IDENT => { // test union_items // union Foo {} // union Foo { -- cgit v1.2.3