Skip to content

Commit 6b49e77

Browse files
committed
Remove dead code
1 parent fd06fe7 commit 6b49e77

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

crates/ra_parser/src/grammar.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,10 @@ fn name_ref(p: &mut Parser) {
282282
}
283283

284284
fn name_ref_or_index(p: &mut Parser) {
285-
if p.at(IDENT) || p.at(INT_NUMBER) {
286-
let m = p.start();
287-
p.bump_any();
288-
m.complete(p, NAME_REF);
289-
} else {
290-
p.err_and_bump("expected identifier");
291-
}
285+
assert!(p.at(IDENT) || p.at(INT_NUMBER));
286+
let m = p.start();
287+
p.bump_any();
288+
m.complete(p, NAME_REF);
292289
}
293290

294291
fn error_block(p: &mut Parser, message: &str) {

0 commit comments

Comments
 (0)