diff options
Diffstat (limited to 'crates/ide/src/display')
-rw-r--r-- | crates/ide/src/display/navigation_target.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ide/src/display/navigation_target.rs b/crates/ide/src/display/navigation_target.rs index cbdd4ecc2..7d0514105 100644 --- a/crates/ide/src/display/navigation_target.rs +++ b/crates/ide/src/display/navigation_target.rs | |||
@@ -18,13 +18,14 @@ use crate::FileSymbol; | |||
18 | 18 | ||
19 | use super::short_label::ShortLabel; | 19 | use super::short_label::ShortLabel; |
20 | 20 | ||
21 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 21 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] |
22 | pub enum SymbolKind { | 22 | pub enum SymbolKind { |
23 | Module, | 23 | Module, |
24 | Impl, | 24 | Impl, |
25 | Field, | 25 | Field, |
26 | TypeParam, | 26 | TypeParam, |
27 | LifetimeParam, | 27 | LifetimeParam, |
28 | ValueParam, | ||
28 | SelfParam, | 29 | SelfParam, |
29 | Local, | 30 | Local, |
30 | Function, | 31 | Function, |
@@ -406,10 +407,11 @@ impl ToNav for hir::Local { | |||
406 | Some(it) => it.to_string().into(), | 407 | Some(it) => it.to_string().into(), |
407 | None => "".into(), | 408 | None => "".into(), |
408 | }; | 409 | }; |
410 | let kind = if self.is_param(db) { SymbolKind::ValueParam } else { SymbolKind::Local }; | ||
409 | NavigationTarget { | 411 | NavigationTarget { |
410 | file_id: full_range.file_id, | 412 | file_id: full_range.file_id, |
411 | name, | 413 | name, |
412 | kind: Some(SymbolKind::Local), | 414 | kind: Some(kind), |
413 | full_range: full_range.range, | 415 | full_range: full_range.range, |
414 | focus_range: None, | 416 | focus_range: None, |
415 | container_name: None, | 417 | container_name: None, |