diff options
author | Kirill Bulatov <[email protected]> | 2019-07-19 13:21:25 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2019-07-20 19:39:04 +0100 |
commit | dfa8373766d645619d6516342565477134acd668 (patch) | |
tree | 9e9fd971ca651cb4fbfcb0442a52d4c6f1900831 | |
parent | 1ce864ac625d95ed928c02b609b84153f437b9df (diff) |
Do not show a lens when the type is declared explicitly
-rw-r--r-- | crates/ra_ide_api/src/display/structure.rs | 4 |
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, |