mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
fix: Fix unresolved proc macro diagnostics pointing to macro expansions
This commit is contained in:
parent
ed44fe52e4
commit
976d07e53e
5 changed files with 63 additions and 41 deletions
|
@ -176,7 +176,7 @@ fn get_adt_source(
|
|||
adt: &hir::Adt,
|
||||
fn_name: &str,
|
||||
) -> Option<(Option<ast::Impl>, FileId)> {
|
||||
let range = adt.source(ctx.sema.db)?.syntax().original_file_range_full(ctx.sema.db);
|
||||
let range = adt.source(ctx.sema.db)?.syntax().original_file_range(ctx.sema.db);
|
||||
let file = ctx.sema.parse(range.file_id);
|
||||
let adt_source =
|
||||
ctx.sema.find_node_at_offset_with_macros(file.syntax(), range.range.start())?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue