Add doc comment for resolve_hir_path_qualifier
@@ -452,6 +452,19 @@ impl<'a, DB: HirDatabase> SemanticsScope<'a, DB> {
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> {
resolve_hir_path_qualifier(self.db, &self.resolver, path)
}
