aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2019-07-19 13:21:25 +0100
committerKirill Bulatov <[email protected]>2019-07-20 19:39:04 +0100
commitdfa8373766d645619d6516342565477134acd668 (patch)
tree9e9fd971ca651cb4fbfcb0442a52d4c6f1900831 /crates/ra_ide_api/src
parent1ce864ac625d95ed928c02b609b84153f437b9df (diff)
Do not show a lens when the type is declared explicitly
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/display/structure.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs
index f891d2c20..ca2321e97 100644
--- a/crates/ra_ide_api/src/display/structure.rs
+++ b/crates/ra_ide_api/src/display/structure.rs
@@ -162,6 +162,10 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
162 let mut label = String::new(); 162 let mut label = String::new();
163 collapse_ws(let_syntax, &mut label); 163 collapse_ws(let_syntax, &mut label);
164 164
165 if let_statement.ascribed_type().is_some() {
166 return None;
167 }
168
165 let pat = match let_statement.pat()?.kind() { 169 let pat = match let_statement.pat()?.kind() {
166 PatKind::BindPat(bind_pat) => bind_pat, 170 PatKind::BindPat(bind_pat) => bind_pat,
167 _ => return None, 171 _ => return None,