diff options
Diffstat (limited to 'tests/rust/prefixed_struct_literal_deep.rs')
-rw-r--r-- | tests/rust/prefixed_struct_literal_deep.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rust/prefixed_struct_literal_deep.rs b/tests/rust/prefixed_struct_literal_deep.rs new file mode 100644 index 0000000..bfa2d8d --- /dev/null +++ b/tests/rust/prefixed_struct_literal_deep.rs @@ -0,0 +1,20 @@ +#[repr(C)] +struct Foo { + a: i32, + b: u32, + bar: Bar, +} + +#[repr(C)] +struct Bar { + a: i32, +} + +pub const VAL: Foo = Foo { + a: 42, + b: 1337, + bar: Bar { a: 323 }, +}; + +#[no_mangle] +pub extern "C" fn root(x: Foo) {} |