diff options
Diffstat (limited to 'crates/ra_ide_api/src/display')
-rw-r--r-- | crates/ra_ide_api/src/display/navigation_target.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index 8cc853dd1..8aff5f2cd 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs | |||
@@ -91,24 +91,11 @@ impl NavigationTarget { | |||
91 | pub(crate) fn from_pat( | 91 | pub(crate) fn from_pat( |
92 | db: &RootDatabase, | 92 | db: &RootDatabase, |
93 | file_id: FileId, | 93 | file_id: FileId, |
94 | pat: AstPtr<ast::Pat>, | 94 | pat: AstPtr<ast::BindPat>, |
95 | ) -> NavigationTarget { | 95 | ) -> NavigationTarget { |
96 | let parse = db.parse(file_id); | 96 | let parse = db.parse(file_id); |
97 | let (name, full_range) = match pat.to_node(parse.tree().syntax()).kind() { | 97 | let pat = pat.to_node(parse.tree().syntax()); |
98 | ast::PatKind::BindPat(pat) => return NavigationTarget::from_bind_pat(file_id, &pat), | 98 | NavigationTarget::from_bind_pat(file_id, &pat) |
99 | _ => ("_".into(), pat.syntax_node_ptr().range()), | ||
100 | }; | ||
101 | |||
102 | NavigationTarget { | ||
103 | file_id, | ||
104 | name, | ||
105 | full_range, | ||
106 | focus_range: None, | ||
107 | kind: NAME, | ||
108 | container_name: None, | ||
109 | description: None, //< No documentation for Description | ||
110 | docs: None, //< No documentation for Pattern | ||
111 | } | ||
112 | } | 99 | } |
113 | 100 | ||
114 | pub(crate) fn from_self_param( | 101 | pub(crate) fn from_self_param( |