Re: [PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-17 Thread Paolo Bonzini
Il ven 18 ott 2024, 05:16 Junjie Mao ha scritto: > > Paolo Bonzini writes: > > > On Thu, Oct 17, 2024 at 7:35 AM Junjie Mao > wrote: > >> Paolo Bonzini writes: > >> > offset_of! was stabilized in Rust 1.77.0. Use an alternative > implemenation > >> > that was found on the Rust forums, and who

Re: [PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-17 Thread Junjie Mao
Paolo Bonzini writes: > On Thu, Oct 17, 2024 at 7:35 AM Junjie Mao wrote: >> Paolo Bonzini writes: >> > offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation >> > that was found on the Rust forums, and whose author agreed to license as >> > MIT for use in QEMU. >> > >> >

Re: [PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-17 Thread Paolo Bonzini
On Thu, Oct 17, 2024 at 7:35 AM Junjie Mao wrote: > Paolo Bonzini writes: > > offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation > > that was found on the Rust forums, and whose author agreed to license as > > MIT for use in QEMU. > > > > The alternative allows only one l

Re: [PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-16 Thread Junjie Mao
Paolo Bonzini writes: > offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation > that was found on the Rust forums, and whose author agreed to license as > MIT for use in QEMU. > > The alternative allows only one level of field access, but apart > from this can be used just

[PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-15 Thread Paolo Bonzini
offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation that was found on the Rust forums, and whose author agreed to license as MIT for use in QEMU. The alternative allows only one level of field access, but apart from this can be used just by replacing core::mem::offset_of! w