Re: [PATCH v2 00/18] Introduce rust: In xdiff
- From
Ezekiel Newren <ezekielnewren@gmail.com>
- Date
- Sep 22, 2025, 17:32 UTC
- Message-ID
- <CAH=ZcbC_ecyPeLS_0DfN3+w9RTqcrt6Je08RPXqb6pJVGaPjuw@mail.gmail.com>
- In-Reply-To
- <CAH=ZcbCsKdZAPxBEPUMvE471ogTNptjFy7FFksWnJfnX=J-F2A@mail.gmail.com>
On Mon, Sep 22, 2025 at 11:23 AM Ezekiel Newren <ezekielnewren@gmail.com> wrote:
> 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.