rust: replace c_str! with c"" literals

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:39:08 +02:00
parent b134a09ffa
commit f117857b39
12 changed files with 32 additions and 107 deletions

View file

@ -81,9 +81,6 @@ are missing:
* "Return position ``impl Trait`` in Traits" (1.75.0, blocker for including
the pinned-init create).
* ``c"" literals`` (stable in 1.77.0). QEMU provides a ``c_str!()`` macro
to define ``CStr`` constants easily
* inline const expression (stable in 1.79.0), currently worked around with
associated constants in the ``FnCall`` trait.
@ -166,7 +163,6 @@ module status
``bitops`` complete
``callbacks`` complete
``cell`` stable
``c_str`` complete
``errno`` complete
``irq`` complete
``memory`` stable
@ -423,7 +419,7 @@ Adding dependencies
Generally, the set of dependent crates is kept small. Think twice before
adding a new external crate, especially if it comes with a large set of
dependencies itself. Sometimes QEMU only needs a small subset of the
functionality; see for example QEMU's ``assertions`` or ``c_str`` modules.
functionality; see for example QEMU's ``assertions`` module.
On top of this recommendation, adding external crates to QEMU is a
slightly complicated process, mostly due to the need to teach Meson how