mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Resolve macro call site in more cases
This commit is contained in:
parent
b30de4ed49
commit
96156b95b5
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ fn map_macro_span_to_location(
|
|||
|
||||
/// Converts a Rust span to a LSP location
|
||||
fn map_span_to_location(span: &DiagnosticSpan, workspace_root: &PathBuf) -> Location {
|
||||
if is_from_macro(&span.file_name) && span.expansion.is_some() {
|
||||
if span.expansion.is_some() {
|
||||
let expansion = span.expansion.as_ref().unwrap();
|
||||
if let Some(macro_range) = map_macro_span_to_location(&expansion, workspace_root) {
|
||||
return macro_range;
|
||||
|
|
Loading…
Reference in a new issue