Skip to content

Commit 6c9fc4f

Browse files
committed
Auto merge of rust-lang#12402 - Veykril:feat-docs, r=Veykril
minor: Freshen up goto feature docs Fixes rust-lang/rust-analyzer#2541
2 parents bd06902 + 8657607 commit 6c9fc4f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

crates/ide/src/goto_declaration.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ use crate::{FilePosition, NavigationTarget, RangeInfo};
1010
// Feature: Go to Declaration
1111
//
1212
// Navigates to the declaration of an identifier.
13+
//
14+
// This is currently the same as `Go to Definition` with the exception of outline modules where it
15+
// will navigate to the `mod name;` item declaration.
1316
pub(crate) fn goto_declaration(
1417
db: &RootDatabase,
1518
position: FilePosition,

crates/ide/src/goto_definition.rs

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use syntax::{ast, AstNode, AstToken, SyntaxKind::*, SyntaxToken, TextRange, T};
1515
//
1616
// Navigates to the definition of an identifier.
1717
//
18+
// For outline modules, this will navigate to the source file of the module.
19+
//
1820
// |===
1921
// | Editor | Shortcut
2022
//

crates/ide/src/goto_implementation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{FilePosition, NavigationTarget, RangeInfo, TryToNav};
1111

1212
// Feature: Go to Implementation
1313
//
14-
// Navigates to the impl block of structs, enums or traits. Also implemented as a code lens.
14+
// Navigates to the impl blocks of types.
1515
//
1616
// |===
1717
// | Editor | Shortcut

0 commit comments

Comments
 (0)