We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b3a87f commit 7c8c28cCopy full SHA for 7c8c28c
crates/ide/src/file_structure.rs
@@ -187,6 +187,24 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
187
};
188
Some(node)
189
},
190
+ ast::LetStmt(it) => {
191
+ let pat = it.pat()?;
192
+
193
+ let mut label = String::new();
194
+ collapse_ws(pat.syntax(), &mut label);
195
196
+ let node = StructureNode {
197
+ parent: None,
198
+ label,
199
+ navigation_range: pat.syntax().text_range(),
200
+ node_range: it.syntax().text_range(),
201
+ kind: StructureNodeKind::SymbolKind(SymbolKind::Local),
202
+ detail: it.ty().map(|ty| ty.to_string()),
203
+ deprecated: false,
204
+ };
205
206
+ Some(node)
207
+ },
208
ast::Macro(it) => decl(it, StructureNodeKind::SymbolKind(SymbolKind::Macro)),
209
_ => None,
210
}
0 commit comments