diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-31 11:50:11 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-31 11:50:11 +0100 |
commit | 09df51dab89340bcf4b8ede95c02c32b0c8eb2bc (patch) | |
tree | 0240c629fe96243e1a1c91ccd679947bfb1ecb03 /crates/ra_ide/src/parent_module.rs | |
parent | 5f7225446e75509ae0d971a6f3e2b9d3e37d6f2a (diff) | |
parent | 13a996f3b68c175f6e6ad8d89081e45850dc5583 (diff) |
Merge #4664
4664: Generate feature documentation from code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/parent_module.rs')
-rw-r--r-- | crates/ra_ide/src/parent_module.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs index a083fb1eb..fa1535da5 100644 --- a/crates/ra_ide/src/parent_module.rs +++ b/crates/ra_ide/src/parent_module.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use hir::Semantics; | 1 | use hir::Semantics; |
4 | use ra_db::{CrateId, FileId, FilePosition}; | 2 | use ra_db::{CrateId, FileId, FilePosition}; |
5 | use ra_ide_db::RootDatabase; | 3 | use ra_ide_db::RootDatabase; |
@@ -11,6 +9,16 @@ use test_utils::mark; | |||
11 | 9 | ||
12 | use crate::NavigationTarget; | 10 | use crate::NavigationTarget; |
13 | 11 | ||
12 | // Feature: Parent Module | ||
13 | // | ||
14 | // Navigates to the parent module of the current module. | ||
15 | // | ||
16 | // |=== | ||
17 | // | Editor | Action Name | ||
18 | // | ||
19 | // | VS Code | **Rust Analyzer: Locate parent module** | ||
20 | // |=== | ||
21 | |||
14 | /// This returns `Vec` because a module may be included from several places. We | 22 | /// This returns `Vec` because a module may be included from several places. We |
15 | /// don't handle this case yet though, so the Vec has length at most one. | 23 | /// don't handle this case yet though, so the Vec has length at most one. |
16 | pub(crate) fn parent_module(db: &RootDatabase, position: FilePosition) -> Vec<NavigationTarget> { | 24 | pub(crate) fn parent_module(db: &RootDatabase, position: FilePosition) -> Vec<NavigationTarget> { |