mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
minor: use reference.range
to get original range
This commit is contained in:
parent
0bf986d718
commit
f9b5e0d219
1 changed files with 2 additions and 3 deletions
|
@ -414,9 +414,8 @@ fn reference_to_node(
|
|||
reference.name.as_name_ref()?.syntax().parent().and_then(ast::PathSegment::cast)?;
|
||||
|
||||
// filter out the reference in marco
|
||||
let s_range = segment.syntax().text_range();
|
||||
let origin_range = sema.original_range(segment.syntax()).range;
|
||||
if s_range != origin_range {
|
||||
let segment_range = segment.syntax().text_range();
|
||||
if segment_range != reference.range {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue