allow aliases in underscores
this helps with
use foo::Trait as _;
syntax
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ fn use_tree(p: &mut Parser) {
|
||||
// yet::another::path,
|
||||
// running::out::of::synonyms::for_::different::*
|
||||
// };
|
||||
// use Trait as _;
|
||||
opt_alias(p);
|
||||
}
|
||||
COLONCOLON => {
|
||||
|
||||
Reference in New Issue
Block a user