Re: [PATCH v2 00/18] Introduce rust: In xdiff
- From
Ezekiel Newren <ezekielnewren@gmail.com>
- Date
- Sep 22, 2025, 18:33 UTC
- Message-ID
- <CAH=ZcbA5hAM9kmO410KzVW7RXWWiwX2oJk6GGPP+6oVYatRVOw@mail.gmail.com>
- In-Reply-To
- <xmqqqzvytkqi.fsf@gitster.g>
On Mon, Sep 22, 2025 at 12:17 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> > 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.
You've convinced me that we shouldn't use Rust type names in C. I've already refactored my code to use [ui]int(8|16|32|64)_t in part 2 of my xdiff cleanup.