mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Add doc comment for resolve_hir_path_qualifier
This commit is contained in:
parent
001a86dc03
commit
bb78d314e1
1 changed files with 13 additions and 0 deletions
|
@ -452,6 +452,19 @@ impl<'a, DB: HirDatabase> SemanticsScope<'a, DB> {
|
||||||
resolve_hir_path(self.db, &self.resolver, path)
|
resolve_hir_path(self.db, &self.resolver, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Resolves a path where we know it is a qualifier of another path.
|
||||||
|
///
|
||||||
|
/// For example, if we have:
|
||||||
|
/// ```
|
||||||
|
/// mod my {
|
||||||
|
/// pub mod foo {
|
||||||
|
/// struct Bar;
|
||||||
|
/// }
|
||||||
|
///
|
||||||
|
/// pub fn foo() {}
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
/// then we know that `foo` in `my::foo::Bar` refers to the module, not the function.
|
||||||
pub fn resolve_hir_path_qualifier(&self, path: &Path) -> Option<PathResolution> {
|
pub fn resolve_hir_path_qualifier(&self, path: &Path) -> Option<PathResolution> {
|
||||||
resolve_hir_path_qualifier(self.db, &self.resolver, path)
|
resolve_hir_path_qualifier(self.db, &self.resolver, path)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue