mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
allow aliases in underscores
this helps with use foo::Trait as _; syntax
This commit is contained in:
parent
dc8bcc1e42
commit
0a19f4f1b4
4 changed files with 21 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue