diff options
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 9c14b954a..56cfb509d 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -121,7 +121,13 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
121 | T![unsafe] => { | 121 | T![unsafe] => { |
122 | // test default_unsafe_impl | 122 | // test default_unsafe_impl |
123 | // default unsafe impl Foo {} | 123 | // default unsafe impl Foo {} |
124 | if p.nth(2) == T![impl] { | 124 | |
125 | // test default_unsafe_fn | ||
126 | // impl T for Foo { | ||
127 | // default unsafe fn foo() {} | ||
128 | // } | ||
129 | let sk = p.nth(2); | ||
130 | if sk == T![impl] || sk == T![fn] { | ||
125 | p.bump_remap(T![default]); | 131 | p.bump_remap(T![default]); |
126 | p.bump(T![unsafe]); | 132 | p.bump(T![unsafe]); |
127 | has_mods = true; | 133 | has_mods = true; |