diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-14 20:44:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-14 20:44:59 +0100 |
commit | 447d849c9ecb3d0f7783a56db429ccc526d0d8dc (patch) | |
tree | b6325f21f742f55d225caebad4d5ac057f683855 /crates/ide | |
parent | ce8fdf3ab05b59b517dee985e4b3828c6e373a91 (diff) | |
parent | c2015e7d182f3cb2cebe686127dd6a3e683df9e6 (diff) |
Merge #9277
9277: internal: more natural order of sources for TypeParam r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/display/navigation_target.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide/src/display/navigation_target.rs b/crates/ide/src/display/navigation_target.rs index b75ec411c..455b32456 100644 --- a/crates/ide/src/display/navigation_target.rs +++ b/crates/ide/src/display/navigation_target.rs | |||
@@ -442,10 +442,10 @@ impl TryToNav for hir::TypeParam { | |||
442 | fn try_to_nav(&self, db: &RootDatabase) -> Option<NavigationTarget> { | 442 | fn try_to_nav(&self, db: &RootDatabase) -> Option<NavigationTarget> { |
443 | let src = self.source(db)?; | 443 | let src = self.source(db)?; |
444 | let full_range = match &src.value { | 444 | let full_range = match &src.value { |
445 | Either::Left(it) => it | 445 | Either::Left(type_param) => type_param.syntax().text_range(), |
446 | Either::Right(trait_) => trait_ | ||
446 | .name() | 447 | .name() |
447 | .map_or_else(|| it.syntax().text_range(), |name| name.syntax().text_range()), | 448 | .map_or_else(|| trait_.syntax().text_range(), |name| name.syntax().text_range()), |
448 | Either::Right(it) => it.syntax().text_range(), | ||
449 | }; | 449 | }; |
450 | let focus_range = match &src.value { | 450 | let focus_range = match &src.value { |
451 | Either::Left(it) => it.name(), | 451 | Either::Left(it) => it.name(), |