2022-08-17 12:55:09 +02:00
|
|
|
// @has "$.index[*][?(@.name=='Union')].visibility" \"public\"
|
2023-05-22 18:17:52 +01:00
|
|
|
// @has "$.index[*][?(@.name=='Union')].inner.union"
|
|
|
|
// @!has "$.index[*][?(@.name=='Union')].inner.union.struct_type"
|
2022-09-16 19:45:26 +01:00
|
|
|
// @set Union = "$.index[*][?(@.name=='Union')].id"
|
2021-01-23 19:40:29 -05:00
|
|
|
pub union Union {
|
|
|
|
int: i32,
|
|
|
|
float: f32,
|
|
|
|
}
|
2022-09-16 19:45:26 +01:00
|
|
|
|
|
|
|
|
2023-05-22 18:17:52 +01:00
|
|
|
// @has "$.index[*][?(@.name=='make_int_union')].inner.function.decl.output.resolved_path"
|
|
|
|
// @is "$.index[*][?(@.name=='make_int_union')].inner.function.decl.output.resolved_path.id" $Union
|
2022-09-16 19:45:26 +01:00
|
|
|
pub fn make_int_union(int: i32) -> Union {
|
|
|
|
Union { int }
|
|
|
|
}
|