aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2019-07-19 13:44:24 +0100
committerKirill Bulatov <[email protected]>2019-07-20 19:39:04 +0100
commit761fc71083b9d810aa006210d6df2b0edf95cf33 (patch)
treea4edf46a11f925fe189617351ee4091dc3046dbc
parentdfa8373766d645619d6516342565477134acd668 (diff)
Fix tuple type lens resolution
-rw-r--r--crates/ra_ide_api/src/display/structure.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs
index ca2321e97..bd2e908da 100644
--- a/crates/ra_ide_api/src/display/structure.rs
+++ b/crates/ra_ide_api/src/display/structure.rs
@@ -166,15 +166,16 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
166 return None; 166 return None;
167 } 167 }
168 168
169 let pat = match let_statement.pat()?.kind() { 169 let pat_range = match let_statement.pat()?.kind() {
170 PatKind::BindPat(bind_pat) => bind_pat, 170 PatKind::BindPat(bind_pat) => bind_pat.syntax().range(),
171 PatKind::TuplePat(tuple_pat) => tuple_pat.syntax().range(),
171 _ => return None, 172 _ => return None,
172 }; 173 };
173 174
174 Some(StructureNode { 175 Some(StructureNode {
175 parent: None, 176 parent: None,
176 label, 177 label,
177 navigation_range: pat.syntax().range(), 178 navigation_range: pat_range,
178 node_range: let_syntax.range(), 179 node_range: let_syntax.range(),
179 kind: let_syntax.kind(), 180 kind: let_syntax.kind(),
180 detail: None, 181 detail: None,