Files
cbindgen/tests/rust/prefixed_struct_literal.rs
T
IGI-111 e35ea840d3 Propagate prefixes to struct literals
Fix #238

This ensures that constants of a struct type have their type and the
type of their underlying value expressions renamed in the case of a
prefix.
2018-11-05 08:59:44 -06:00

15 lines
198 B
Rust

#[repr(C)]
struct Foo {
a: i32,
b: u32,
}
impl Foo {
const FOO: Foo = Foo{ a: 42, b: 47, };
}
const BAR: Foo = Foo{ a: 42, b: 1337, };
#[no_mangle]
pub extern "C" fn root(x: Foo) { }