Skip to content

Commit 3ec2dcf

Browse files
committed
Address review
1 parent a5588b9 commit 3ec2dcf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/ra_parser/src/grammar/items.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
119119
&& (match p.nth(1) {
120120
T![impl] => true,
121121
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] {
123125
p.bump_remap(T![default]);
124-
p.bump_remap(T![unsafe]);
126+
p.bump(T![unsafe]);
125127
has_mods = true;
126128
}
127129
false
@@ -195,9 +197,6 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
195197
// test default_impl
196198
// default impl Foo {}
197199

198-
// test default_unsafe_impl
199-
// default unsafe impl Foo {}
200-
201200
// test_err default_fn_type
202201
// trait T {
203202
// default type T = Bar;

0 commit comments

Comments
 (0)