From dfa8373766d645619d6516342565477134acd668 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 19 Jul 2019 15:21:25 +0300 Subject: Do not show a lens when the type is declared explicitly --- crates/ra_ide_api/src/display/structure.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_ide_api/src') 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 { let mut label = String::new(); collapse_ws(let_syntax, &mut label); + if let_statement.ascribed_type().is_some() { + return None; + } + let pat = match let_statement.pat()?.kind() { PatKind::BindPat(bind_pat) => bind_pat, _ => return None, -- cgit v1.2.3