diff options
Diffstat (limited to 'crates/ra_ide_api/src/display')
-rw-r--r-- | crates/ra_ide_api/src/display/structure.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs index bd2e908da..2ba10b2ef 100644 --- a/crates/ra_ide_api/src/display/structure.rs +++ b/crates/ra_ide_api/src/display/structure.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use crate::TextRange; | 1 | use crate::TextRange; |
2 | 2 | ||
3 | use ra_syntax::ast::PatKind; | ||
4 | use ra_syntax::{ | 3 | use ra_syntax::{ |
5 | algo::visit::{visitor, Visitor}, | 4 | algo::visit::{visitor, Visitor}, |
6 | ast::{self, AttrsOwner, NameOwner, TypeAscriptionOwner, TypeParamsOwner}, | 5 | ast::{self, AttrsOwner, NameOwner, TypeAscriptionOwner, TypeParamsOwner}, |
@@ -156,32 +155,6 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> { | |||
156 | } | 155 | } |
157 | decl(mc) | 156 | decl(mc) |
158 | }) | 157 | }) |
159 | .visit(|let_statement: ast::LetStmt| { | ||
160 | let let_syntax = let_statement.syntax(); | ||
161 | |||
162 | let mut label = String::new(); | ||
163 | collapse_ws(let_syntax, &mut label); | ||
164 | |||
165 | if let_statement.ascribed_type().is_some() { | ||
166 | return None; | ||
167 | } | ||
168 | |||
169 | let pat_range = match let_statement.pat()?.kind() { | ||
170 | PatKind::BindPat(bind_pat) => bind_pat.syntax().range(), | ||
171 | PatKind::TuplePat(tuple_pat) => tuple_pat.syntax().range(), | ||
172 | _ => return None, | ||
173 | }; | ||
174 | |||
175 | Some(StructureNode { | ||
176 | parent: None, | ||
177 | label, | ||
178 | navigation_range: pat_range, | ||
179 | node_range: let_syntax.range(), | ||
180 | kind: let_syntax.kind(), | ||
181 | detail: None, | ||
182 | deprecated: false, | ||
183 | }) | ||
184 | }) | ||
185 | .accept(&node)? | 158 | .accept(&node)? |
186 | } | 159 | } |
187 | 160 | ||