mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 18:43:38 +00:00
list enum variants in the outline
This commit is contained in:
parent
154ab4206d
commit
ba4c5021c4
@ -1,8 +1,8 @@
|
||||
---
|
||||
created: "2019-01-24T18:04:00.090162+00:00"
|
||||
creator: insta@0.4.0
|
||||
created: "2019-01-26T07:11:02.463391362+00:00"
|
||||
creator: insta@0.5.2
|
||||
expression: structure
|
||||
source: "crates\\ra_ide_api_light\\src\\structure.rs"
|
||||
source: crates/ra_ide_api_light/src/structure.rs
|
||||
---
|
||||
[
|
||||
StructureNode {
|
||||
@ -77,6 +77,26 @@ source: "crates\\ra_ide_api_light\\src\\structure.rs"
|
||||
kind: ENUM_DEF,
|
||||
detail: None
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
6
|
||||
),
|
||||
label: "X",
|
||||
navigation_range: [169; 170),
|
||||
node_range: [169; 170),
|
||||
kind: ENUM_VARIANT,
|
||||
detail: None
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
6
|
||||
),
|
||||
label: "Y",
|
||||
navigation_range: [172; 173),
|
||||
node_range: [172; 178),
|
||||
kind: ENUM_VARIANT,
|
||||
detail: None
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
label: "T",
|
||||
|
@ -103,6 +103,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
|
||||
.visit(decl::<ast::StructDef>)
|
||||
.visit(|nfd: &ast::NamedFieldDef| decl_with_type_ref(nfd, nfd.type_ref()))
|
||||
.visit(decl::<ast::EnumDef>)
|
||||
.visit(decl::<ast::EnumVariant>)
|
||||
.visit(decl::<ast::TraitDef>)
|
||||
.visit(decl::<ast::Module>)
|
||||
.visit(|td: &ast::TypeDef| decl_with_type_ref(td, td.type_ref()))
|
||||
|
Loading…
Reference in New Issue
Block a user