diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 820be583f23..0b52b01abe8 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -4,7 +4,6 @@ use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; use ra_db::{FileId, SourceDatabase}; use ra_ide_db::{defs::Definition, RootDatabase}; -use ra_syntax::ast::AstToken; use ra_syntax::{ ast::{self, DocCommentsOwner, NameOwner}, match_ast, AstNode, SmolStr, @@ -159,13 +158,12 @@ pub(crate) fn from_doc_commented( ) -> NavigationTarget { let name = named.value.name().map(|it| it.text().clone()).unwrap_or_else(|| SmolStr::new("_")); - let focus_range = node.value.doc_comments().next().map(|it| it.syntax().text_range()); let frange = original_range(db, node.map(|it| it.syntax())); NavigationTarget::from_syntax( frange.file_id, name, - focus_range, + None, frange.range, node.value.syntax().kind(), ) diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs index 7c505a765f2..8105ef3732a 100644 --- a/crates/ra_ide/src/runnables.rs +++ b/crates/ra_ide/src/runnables.rs @@ -427,9 +427,7 @@ fn foo() {} full_range: 22..64, name: "foo", kind: FN_DEF, - focus_range: Some( - 22..29, - ), + focus_range: None, container_name: None, description: None, docs: None, @@ -494,9 +492,7 @@ fn foo() {} full_range: 51..105, name: "foo", kind: FN_DEF, - focus_range: Some( - 51..58, - ), + focus_range: None, container_name: None, description: None, docs: None,