mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Simplify
This commit is contained in:
parent
536ed7c451
commit
9915103c9e
2 changed files with 9 additions and 9 deletions
|
@ -447,7 +447,7 @@ impl NameRefClass {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(path) = name_ref.syntax().ancestors().find_map(ast::Path::cast) {
|
||||
if let Some(path) = ast::PathSegment::cast(parent.clone()).map(|it| it.parent_path()) {
|
||||
if path.qualifier().is_none() {
|
||||
if let Some(macro_call) = path.syntax().parent().and_then(ast::MacroCall::cast) {
|
||||
// Only use this to resolve single-segment macro calls like `foo!()`. Multi-segment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue