mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Qualify some paths in 'add missing impl members'
This commit is contained in:
parent
460fa71c55
commit
4d75430e91
6 changed files with 128 additions and 3 deletions
|
@ -227,6 +227,19 @@ impl Module {
|
|||
pub(crate) fn with_module_id(self, module_id: LocalModuleId) -> Module {
|
||||
Module::new(self.krate(), module_id)
|
||||
}
|
||||
|
||||
pub fn find_path(
|
||||
self,
|
||||
db: &impl DefDatabase,
|
||||
item: ModuleDef,
|
||||
) -> Option<hir_def::path::ModPath> {
|
||||
// FIXME expose namespace choice
|
||||
hir_def::find_path::find_path(
|
||||
db,
|
||||
hir_def::item_scope::ItemInNs::Types(item.into()),
|
||||
self.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue