diff options
| author | bors <bors@rust-lang.org> | 2022-05-27 13:47:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-27 13:47:56 +0000 |
| commit | 6c9fc4fec2193ebfa7ed7eb163b6eea925b56f7b (patch) | |
| tree | 6232baf6788c46f85b2d8053af58b1f516b001be | |
| parent | bd06902f90ecc5d411d1743c9cfdbd2bb956e4f5 (diff) | |
| parent | 86576072abf241b583e37f4c5eebf86e7e62122b (diff) | |
| download | rust-6c9fc4fec2193ebfa7ed7eb163b6eea925b56f7b.tar.gz rust-6c9fc4fec2193ebfa7ed7eb163b6eea925b56f7b.zip | |
Auto merge of #12402 - Veykril:feat-docs, r=Veykril
minor: Freshen up goto feature docs Fixes https://github.com/rust-lang/rust-analyzer/issues/2541
| -rw-r--r-- | crates/ide/src/goto_declaration.rs | 3 | ||||
| -rw-r--r-- | crates/ide/src/goto_definition.rs | 2 | ||||
| -rw-r--r-- | crates/ide/src/goto_implementation.rs | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/crates/ide/src/goto_declaration.rs b/crates/ide/src/goto_declaration.rs index cb2cddc20da..926292c9b3c 100644 --- a/crates/ide/src/goto_declaration.rs +++ b/crates/ide/src/goto_declaration.rs @@ -10,6 +10,9 @@ use crate::{FilePosition, NavigationTarget, RangeInfo}; // Feature: Go to Declaration // // Navigates to the declaration of an identifier. +// +// This is currently the same as `Go to Definition` with the exception of outline modules where it +// will navigate to the `mod name;` item declaration. pub(crate) fn goto_declaration( db: &RootDatabase, position: FilePosition, diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index 30f48819e6b..df73879aed7 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs @@ -15,6 +15,8 @@ use syntax::{ast, AstNode, AstToken, SyntaxKind::*, SyntaxToken, TextRange, T}; // // Navigates to the definition of an identifier. // +// For outline modules, this will navigate to the source file of the module. +// // |=== // | Editor | Shortcut // diff --git a/crates/ide/src/goto_implementation.rs b/crates/ide/src/goto_implementation.rs index a7d6bc24019..1d2909fa280 100644 --- a/crates/ide/src/goto_implementation.rs +++ b/crates/ide/src/goto_implementation.rs @@ -11,7 +11,7 @@ use crate::{FilePosition, NavigationTarget, RangeInfo, TryToNav}; // Feature: Go to Implementation // -// Navigates to the impl block of structs, enums or traits. Also implemented as a code lens. +// Navigates to the impl blocks of types. // // |=== // | Editor | Shortcut |
