mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Fix diagnostics panicking when resolving to different files due to macros
This commit is contained in:
parent
634d588fd7
commit
ba01ff4f88
15 changed files with 158 additions and 77 deletions
|
@ -31,7 +31,7 @@ pub(crate) fn inactive_code(
|
|||
let res = Diagnostic::new(
|
||||
DiagnosticCode::Ra("inactive-code", Severity::WeakWarning),
|
||||
message,
|
||||
ctx.sema.diagnostics_display_range(d.node.clone()).range,
|
||||
ctx.sema.diagnostics_display_range(d.node.clone()),
|
||||
)
|
||||
.with_unused(true);
|
||||
Some(res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue