Update crates/ra_parser/src/grammar/items.rs

This commit is contained in:
Aleksey Kladov 2020-06-09 10:50:25 +02:00 committed by GitHub
parent e38685cb48
commit 2785362a1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,8 +126,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
// impl T for Foo {
// default unsafe fn foo() {}
// }
let sk = p.nth(2);
if sk == T![impl] || sk == T![fn] {
if p.nth(2) == T![impl] || p.nth(2) == T![fn] {
p.bump_remap(T![default]);
p.bump(T![unsafe]);
has_mods = true;