mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
16 lines
540 B
Rust
16 lines
540 B
Rust
// @has "$.index[*][?(@.name=='Union')].visibility" \"public\"
|
|
// @has "$.index[*][?(@.name=='Union')].inner.union"
|
|
// @!has "$.index[*][?(@.name=='Union')].inner.union.struct_type"
|
|
// @set Union = "$.index[*][?(@.name=='Union')].id"
|
|
pub union Union {
|
|
int: i32,
|
|
float: f32,
|
|
}
|
|
|
|
|
|
// @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
|
|
pub fn make_int_union(int: i32) -> Union {
|
|
Union { int }
|
|
}
|