mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +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
|
@ -45,11 +45,11 @@ pub(crate) fn parent_module(db: &RootDatabase, position: FilePosition) -> Vec<Na
|
|||
Some(module) => sema
|
||||
.to_def(&module)
|
||||
.into_iter()
|
||||
.map(|module| NavigationTarget::from_module_to_decl(db, module))
|
||||
.flat_map(|module| NavigationTarget::from_module_to_decl(db, module))
|
||||
.collect(),
|
||||
None => sema
|
||||
.to_module_defs(position.file_id)
|
||||
.map(|module| NavigationTarget::from_module_to_decl(db, module))
|
||||
.flat_map(|module| NavigationTarget::from_module_to_decl(db, module))
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue