2023-01-01 12:53:50 -06:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
|
|
|
#[repr(i32)]
|
|
|
|
// @is "$.index[*][?(@.name=='Foo')].attrs" '["#[repr(i32)]"]'
|
|
|
|
pub enum Foo {
|
2023-05-22 12:17:52 -05:00
|
|
|
// @is "$.index[*][?(@.name=='Struct')].inner.variant.discriminant" null
|
|
|
|
// @count "$.index[*][?(@.name=='Struct')].inner.variant.kind.struct.fields[*]" 0
|
2023-01-01 12:53:50 -06:00
|
|
|
Struct {},
|
2023-05-22 12:17:52 -05:00
|
|
|
// @is "$.index[*][?(@.name=='StructWithDiscr')].inner.variant.discriminant" '{"expr": "42", "value": "42"}'
|
|
|
|
// @count "$.index[*][?(@.name=='StructWithDiscr')].inner.variant.kind.struct.fields[*]" 1
|
2023-01-01 12:53:50 -06:00
|
|
|
StructWithDiscr { x: i32 } = 42,
|
2023-05-22 12:17:52 -05:00
|
|
|
// @is "$.index[*][?(@.name=='StructWithHexDiscr')].inner.variant.discriminant" '{"expr": "0x42", "value": "66"}'
|
|
|
|
// @count "$.index[*][?(@.name=='StructWithHexDiscr')].inner.variant.kind.struct.fields[*]" 2
|
2023-01-01 12:53:50 -06:00
|
|
|
StructWithHexDiscr { x: i32, y: bool } = 0x42,
|
|
|
|
}
|