diff options
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r-- | crates/ra_ide/src/display/navigation_target.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 61dca14ac..f920d3db6 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs | |||
@@ -1,6 +1,7 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir::{AssocItem, Either, FieldSource, HasSource, InFile, ModuleSource}; | 3 | use either::Either; |
4 | use hir::{AssocItem, FieldSource, HasSource, InFile, ModuleSource}; | ||
4 | use ra_db::{FileId, SourceDatabase}; | 5 | use ra_db::{FileId, SourceDatabase}; |
5 | use ra_syntax::{ | 6 | use ra_syntax::{ |
6 | ast::{self, DocCommentsOwner, NameOwner}, | 7 | ast::{self, DocCommentsOwner, NameOwner}, |
@@ -342,10 +343,10 @@ impl ToNav for hir::Local { | |||
342 | fn to_nav(&self, db: &RootDatabase) -> NavigationTarget { | 343 | fn to_nav(&self, db: &RootDatabase) -> NavigationTarget { |
343 | let src = self.source(db); | 344 | let src = self.source(db); |
344 | let (full_range, focus_range) = match src.value { | 345 | let (full_range, focus_range) = match src.value { |
345 | Either::A(it) => { | 346 | Either::Left(it) => { |
346 | (it.syntax().text_range(), it.name().map(|it| it.syntax().text_range())) | 347 | (it.syntax().text_range(), it.name().map(|it| it.syntax().text_range())) |
347 | } | 348 | } |
348 | Either::B(it) => (it.syntax().text_range(), Some(it.self_kw_token().text_range())), | 349 | Either::Right(it) => (it.syntax().text_range(), Some(it.self_kw_token().text_range())), |
349 | }; | 350 | }; |
350 | let name = match self.name(db) { | 351 | let name = match self.name(db) { |
351 | Some(it) => it.to_string().into(), | 352 | Some(it) => it.to_string().into(), |