introduce bump as a better-checked alternative to bump_any

This commit is contained in:
Aleksey Kladov 2019-09-10 01:03:00 +03:00
parent e2b378ef7e
commit d8aa9a1d81
2 changed files with 8 additions and 2 deletions

View file

@ -126,7 +126,7 @@ pub(crate) mod fragments {
while !p.at(EOF) {
if p.at(T![;]) {
p.bump_any();
p.bump(T![;]);
continue;
}
@ -179,7 +179,7 @@ fn opt_visibility(p: &mut Parser) -> bool {
match p.current() {
T![pub] => {
let m = p.start();
p.bump_any();
p.bump(T![pub]);
if p.at(T!['(']) {
match p.nth(1) {
// test crate_visibility