mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Merge #2562
2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553 This PR change the order for finding `full_range` of `focus_range` in following orders: 1. map both ranges to macro_call 2. map focus range to a token inside macro call, and full range to the whole of macro call 3. map both ranges to the whole of macro call And fix the corresponding tests and make these tests easily to follow. Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
commit
4a58522119
5 changed files with 86 additions and 48 deletions
|
@ -58,6 +58,6 @@ pub use hir_def::{
|
|||
type_ref::Mutability,
|
||||
};
|
||||
pub use hir_expand::{
|
||||
name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile,
|
||||
name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile, Origin,
|
||||
};
|
||||
pub use hir_ty::{display::HirDisplay, CallableDef};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue