Re: [PATCH v2 00/18] Introduce rust: In xdiff
From: Junio C Hamano <hidden>
Date: 2025-09-22 18:17:43
From: Junio C Hamano <hidden>
Date: 2025-09-22 18:17:43
Ezekiel Newren [off-list ref] writes:
On Mon, Sep 22, 2025 at 11:23 AM Ezekiel Newren [off-list ref] wrote:quoted
Cbindgen parse's Rust and generates C header files; If a field in a struct uses u16 as the name then Rust won't compile, and cbindgen can't create the C header file.I just tried this in Rust and it turns out you actually can use u16 as a struct field name. My bad. I think that's a bad idea and should be discouraged though.
That's a great news. It means we do not have to worry about existing variables and structure member names at all while working with cbindgen.