qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC 06/13] rust: add bindings for memattrs


From: Zhao Liu
Subject: Re: [RFC 06/13] rust: add bindings for memattrs
Date: Thu, 23 Jan 2025 23:10:38 +0800

> Another solution would be to implement Zeroable for __BindgenBitfieldUnit in
> bindings.rs, but this is much nicer!  It works even with old Rust versions
> and, even though it needs manual implementation of the trait each type, it
> doesn't require enumerating the fields one by one.  So it's better than the
> current version of Zeroable and, if you wish, you can also replace existing
> implementations of Zeroable with const_zero.

I'm working on this, and it's just a simple patch.

But I'm not sure why Zeroable needs a Default constraint. I think Sized
seems to be enough, doesn't it?

Thanks,
Zhao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]