mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 22:24:14 +00:00
Merge #663
663: list enum variants in the outline r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
2f270a51d2
2 changed files with 24 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
created: "2019-01-24T18:04:00.090162+00:00"
|
created: "2019-01-26T07:11:02.463391362+00:00"
|
||||||
creator: insta@0.4.0
|
creator: insta@0.5.2
|
||||||
expression: structure
|
expression: structure
|
||||||
source: "crates\\ra_ide_api_light\\src\\structure.rs"
|
source: crates/ra_ide_api_light/src/structure.rs
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
StructureNode {
|
StructureNode {
|
||||||
|
@ -77,6 +77,26 @@ source: "crates\\ra_ide_api_light\\src\\structure.rs"
|
||||||
kind: ENUM_DEF,
|
kind: ENUM_DEF,
|
||||||
detail: None
|
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 {
|
StructureNode {
|
||||||
parent: None,
|
parent: None,
|
||||||
label: "T",
|
label: "T",
|
||||||
|
|
|
@ -103,6 +103,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
|
||||||
.visit(decl::<ast::StructDef>)
|
.visit(decl::<ast::StructDef>)
|
||||||
.visit(|nfd: &ast::NamedFieldDef| decl_with_type_ref(nfd, nfd.type_ref()))
|
.visit(|nfd: &ast::NamedFieldDef| decl_with_type_ref(nfd, nfd.type_ref()))
|
||||||
.visit(decl::<ast::EnumDef>)
|
.visit(decl::<ast::EnumDef>)
|
||||||
|
.visit(decl::<ast::EnumVariant>)
|
||||||
.visit(decl::<ast::TraitDef>)
|
.visit(decl::<ast::TraitDef>)
|
||||||
.visit(decl::<ast::Module>)
|
.visit(decl::<ast::Module>)
|
||||||
.visit(|td: &ast::TypeDef| decl_with_type_ref(td, td.type_ref()))
|
.visit(|td: &ast::TypeDef| decl_with_type_ref(td, td.type_ref()))
|
||||||
|
|
Loading…
Reference in a new issue