Resolve macro call site in more cases

This commit is contained in:
Emil Lauridsen 2019-12-29 19:14:18 +01:00
parent b30de4ed49
commit 96156b95b5

View file

@ -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;