Do not show a lens when the type is declared explicitly

This commit is contained in:
Kirill Bulatov 2019-07-19 15:21:25 +03:00
parent 1ce864ac62
commit dfa8373766

View File

@ -162,6 +162,10 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
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,