Merge pull request #20185 from ChayimFriedman2/variant-symbols

feat: Include enum variants in world symbols
This commit is contained in:
David Barsky 2025-07-07 15:15:27 +00:00 committed by GitHub
commit 5bae4f5c81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 75 additions and 0 deletions

View file

@ -10,6 +10,40 @@
},
},
[
FileSymbol {
name: "A",
def: Variant(
Variant {
id: EnumVariantId(
7800,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
Id(2000),
),
),
ptr: SyntaxNodePtr {
kind: VARIANT,
range: 201..202,
},
name_ptr: AstPtr(
SyntaxNodePtr {
kind: NAME,
range: 201..202,
},
),
},
container_name: Some(
"Enum",
),
is_alias: false,
is_assoc: true,
is_import: false,
do_not_complete: Yes,
},
FileSymbol {
name: "Alias",
def: TypeAlias(
@ -42,6 +76,40 @@
is_import: false,
do_not_complete: Yes,
},
FileSymbol {
name: "B",
def: Variant(
Variant {
id: EnumVariantId(
7801,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
Id(2000),
),
),
ptr: SyntaxNodePtr {
kind: VARIANT,
range: 204..205,
},
name_ptr: AstPtr(
SyntaxNodePtr {
kind: NAME,
range: 204..205,
},
),
},
container_name: Some(
"Enum",
),
is_alias: false,
is_assoc: true,
is_import: false,
do_not_complete: Yes,
},
FileSymbol {
name: "CONST",
def: Const(