diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar/items.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/items.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/grammar/items.rs b/crates/ra_syntax/src/grammar/items.rs index 4473c2fab..aa5fe0777 100644 --- a/crates/ra_syntax/src/grammar/items.rs +++ b/crates/ra_syntax/src/grammar/items.rs | |||
@@ -89,7 +89,7 @@ pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem { | |||
89 | // modifiers | 89 | // modifiers |
90 | has_mods |= p.eat(CONST_KW); | 90 | has_mods |= p.eat(CONST_KW); |
91 | 91 | ||
92 | // test unsafe_block_in_mod | 92 | // test_err unsafe_block_in_mod |
93 | // fn foo(){} unsafe { } fn bar(){} | 93 | // fn foo(){} unsafe { } fn bar(){} |
94 | if p.at(UNSAFE_KW) && p.nth(1) != L_CURLY { | 94 | if p.at(UNSAFE_KW) && p.nth(1) != L_CURLY { |
95 | p.eat(UNSAFE_KW); | 95 | p.eat(UNSAFE_KW); |
@@ -202,7 +202,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> { | |||
202 | } | 202 | } |
203 | STRUCT_DEF | 203 | STRUCT_DEF |
204 | } | 204 | } |
205 | IDENT if p.at_contextual_kw("union") => { | 205 | IDENT if p.at_contextual_kw("union") && p.nth(1) == IDENT => { |
206 | // test union_items | 206 | // test union_items |
207 | // union Foo {} | 207 | // union Foo {} |
208 | // union Foo { | 208 | // union Foo { |