allow aliases in underscores

this helps with

    use foo::Trait as _;

syntax
This commit is contained in:
Aleksey Kladov 2019-03-04 16:38:54 +03:00
parent dc8bcc1e42
commit 0a19f4f1b4
4 changed files with 21 additions and 2 deletions

View file

@ -129,7 +129,9 @@ fn opt_alias(p: &mut Parser) {
if p.at(AS_KW) {
let m = p.start();
p.bump();
name(p);
if !p.eat(UNDERSCORE) {
name(p);
}
m.complete(p, ALIAS);
}
}