mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Allow navigation targets to be duplicated when the focus range lies in the macro definition site
This commit is contained in:
parent
9b7ec5e31b
commit
9cb13b6efb
38 changed files with 851 additions and 488 deletions
|
@ -1438,7 +1438,7 @@ pub(crate) fn handle_inlay_hints_resolve(
|
|||
};
|
||||
|
||||
let resolve_data: lsp_ext::InlayHintResolveData = serde_json::from_value(data)?;
|
||||
let file_id = FileId(resolve_data.file_id);
|
||||
let file_id = FileId::from_raw(resolve_data.file_id);
|
||||
anyhow::ensure!(snap.file_exists(file_id), "Invalid LSP resolve data");
|
||||
|
||||
let line_index = snap.file_line_index(file_id)?;
|
||||
|
|
|
@ -457,7 +457,7 @@ pub(crate) fn inlay_hint(
|
|||
inlay_hint.text_edit.map(|it| text_edit_vec(line_index, it))
|
||||
};
|
||||
let data = if needs_resolve && something_to_resolve {
|
||||
Some(to_value(lsp_ext::InlayHintResolveData { file_id: file_id.0 }).unwrap())
|
||||
Some(to_value(lsp_ext::InlayHintResolveData { file_id: file_id.index() }).unwrap())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue