Allow navigation targets to be duplicated when the focus range lies in the macro definition site

This commit is contained in:
Lukas Wirth 2023-12-06 11:53:28 +01:00
parent 9b7ec5e31b
commit 9cb13b6efb
38 changed files with 851 additions and 488 deletions

View file

@ -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(),
}
}