diff options
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 41f8bb0b6..0d3568e5f 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -119,9 +119,11 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
119 | && (match p.nth(1) { | 119 | && (match p.nth(1) { |
120 | T![impl] => true, | 120 | T![impl] => true, |
121 | T![unsafe] => { | 121 | T![unsafe] => { |
122 | if T![impl] == p.nth(2) { | 122 | // test default_unsafe_impl |
123 | // default unsafe impl Foo {} | ||
124 | if p.nth(2) == T![impl] { | ||
123 | p.bump_remap(T![default]); | 125 | p.bump_remap(T![default]); |
124 | p.bump_remap(T![unsafe]); | 126 | p.bump(T![unsafe]); |
125 | has_mods = true; | 127 | has_mods = true; |
126 | } | 128 | } |
127 | false | 129 | false |
@@ -195,9 +197,6 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
195 | // test default_impl | 197 | // test default_impl |
196 | // default impl Foo {} | 198 | // default impl Foo {} |
197 | 199 | ||
198 | // test default_unsafe_impl | ||
199 | // default unsafe impl Foo {} | ||
200 | |||
201 | // test_err default_fn_type | 200 | // test_err default_fn_type |
202 | // trait T { | 201 | // trait T { |
203 | // default type T = Bar; | 202 | // default type T = Bar; |