cbindgen/tests/rust/decl_name_conflicting.rs
Emilio Cobos Álvarez 750745831a ir: Deal with name conflicts correctly in declaration type resolution.
So, basically, make opaque items last, and make previous names override
them.

Fixes #649
2021-01-26 12:55:05 +01:00

15 lines
293 B
Rust

mod uhoh {
enum BindingType { Buffer, NotBuffer }
}
#[repr(u32)]
pub enum BindingType { Buffer = 0, NotBuffer = 1 }
#[repr(C)]
pub struct BindGroupLayoutEntry {
pub ty: BindingType, // This is the repr(u32) enum
}
#[no_mangle]
pub extern "C" fn root(entry: BindGroupLayoutEntry) {}