diff options
-rw-r--r-- | crates/ra_ide_api/src/display/structure.rs | 7 |
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, |