aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorHasan Ali <[email protected]>2020-05-16 20:40:58 +0100
committerHasan Ali <[email protected]>2020-05-16 20:40:58 +0100
commitbb78d314e15999a68f5eb865486824966c13402f (patch)
tree09bb5b0c82f08a74d3e0dbd447aef9008bf77bd8 /crates
parent001a86dc03104b75df732d69257d22526cf422b7 (diff)
Add doc comment for resolve_hir_path_qualifier
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/semantics.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index c1129a494..7c1f79f27 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -452,6 +452,19 @@ impl<'a, DB: HirDatabase> SemanticsScope<'a, DB> {
452 resolve_hir_path(self.db, &self.resolver, path) 452 resolve_hir_path(self.db, &self.resolver, path)
453 } 453 }
454 454
455 /// Resolves a path where we know it is a qualifier of another path.
456 ///
457 /// For example, if we have:
458 /// ```
459 /// mod my {
460 /// pub mod foo {
461 /// struct Bar;
462 /// }
463 ///
464 /// pub fn foo() {}
465 /// }
466 /// ```
467 /// then we know that `foo` in `my::foo::Bar` refers to the module, not the function.
455 pub fn resolve_hir_path_qualifier(&self, path: &Path) -> Option<PathResolution> { 468 pub fn resolve_hir_path_qualifier(&self, path: &Path) -> Option<PathResolution> {
456 resolve_hir_path_qualifier(self.db, &self.resolver, path) 469 resolve_hir_path_qualifier(self.db, &self.resolver, path)
457 } 470 }