Add doc comment for resolve_hir_path_qualifier
This commit is contained in:
parent
001a86dc03
commit
bb78d314e1
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user