rust: remove offset_of replacement

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2025-05-02 10:35:49 +02:00
parent 5df3fe062f
commit b134a09ffa
15 changed files with 16 additions and 239 deletions

View file

@ -84,12 +84,6 @@ are missing:
* ``c"" literals`` (stable in 1.77.0). QEMU provides a ``c_str!()`` macro
to define ``CStr`` constants easily
* ``offset_of!`` (stable in 1.77.0). QEMU uses ``offset_of!()`` heavily; it
provides a replacement in the ``qemu_api`` crate, but it does not support
lifetime parameters and therefore ``&'a Something`` fields in the struct
may have to be replaced by ``NonNull<Something>``. *Nested* ``offset_of!``
was only stabilized in Rust 1.82.0, but it is not used.
* inline const expression (stable in 1.79.0), currently worked around with
associated constants in the ``FnCall`` trait.