mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-18 11:20:36 +00:00
fix: Don't create empty path nodes
This commit is contained in:
parent
b6fc9c14ac
commit
caba872f88
6 changed files with 26 additions and 24 deletions
|
|
@ -168,10 +168,10 @@ pub(super) fn const_arg_expr(p: &mut Parser<'_>) {
|
|||
expressions::literal(p);
|
||||
lm.complete(p, PREFIX_EXPR);
|
||||
}
|
||||
_ if paths::is_use_path_start(p) => {
|
||||
_ if paths::is_path_start(p) => {
|
||||
// This shouldn't be hit by `const_arg`
|
||||
let lm = p.start();
|
||||
paths::use_path(p);
|
||||
paths::expr_path(p);
|
||||
lm.complete(p, PATH_EXPR);
|
||||
}
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue