You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Propagating const arguments through generics that use generics.#[repr(C)]structInner<N:usize>{bytes:[u8;N],}#[repr(C)]structOuter<N:usize>{inner:Inner<N>,// don't declare two different structs named `Inner_N`}#[no_mangle]pubextern"C"fnone() -> Outer<1>{Outer{inner:Inner{bytes:[0]}}}#[no_mangle]pubextern"C"fntwo() -> Outer<2>{Outer{inner:Inner{bytes:[0,0]}}}
cargo run -- --lang c --style tag $FILE produces this:
The corresponding thing works fine with type parameters, so there must be something I failed to hook up in #759, or maybe we aren't modeling the value namespace at all. Filing the bug because I don't have time to look right now. I should have time in the next few days, though.
The text was updated successfully, but these errors were encountered:
jorendorff
added a commit
to jorendorff/cbindgen
that referenced
this issue
May 14, 2022
The test case below generates broken C code.
cargo run -- --lang c --style tag $FILE
produces this:The corresponding thing works fine with type parameters, so there must be something I failed to hook up in #759, or maybe we aren't modeling the value namespace at all. Filing the bug because I don't have time to look right now. I should have time in the next few days, though.
The text was updated successfully, but these errors were encountered: