mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
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)
|
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…
Reference in New Issue
Block a user