mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue