rust/tests/rustdoc-json/unions/union.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
519 B
Rust
Raw Normal View History

2022-08-17 05:55:09 -05:00
// @has "$.index[*][?(@.name=='Union')].visibility" \"public\"
// @has "$.index[*][?(@.name=='Union')].kind" \"union\"
// @!has "$.index[*][?(@.name=='Union')].inner.struct_type"
// @set Union = "$.index[*][?(@.name=='Union')].id"
pub union Union {
int: i32,
float: f32,
}
// @is "$.index[*][?(@.name=='make_int_union')].inner.decl.output.kind" '"resolved_path"'
// @is "$.index[*][?(@.name=='make_int_union')].inner.decl.output.inner.id" $Union
pub fn make_int_union(int: i32) -> Union {
Union { int }
}