[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/49] rust: fix doc test syntax
From: |
Paolo Bonzini |
Subject: |
[PULL 13/49] rust: fix doc test syntax |
Date: |
Wed, 11 Dec 2024 17:26:43 +0100 |
Allow "cargo test --doc" to pass.
Reviewed-by: Junjie Mao <junjie.mao@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
rust/qemu-api/src/zeroable.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rust/qemu-api/src/zeroable.rs b/rust/qemu-api/src/zeroable.rs
index 13cdb2ccba5..6125aeed8b4 100644
--- a/rust/qemu-api/src/zeroable.rs
+++ b/rust/qemu-api/src/zeroable.rs
@@ -7,9 +7,9 @@
/// behavior. This trait in principle could be implemented as just:
///
/// ```
-/// const ZERO: Self = unsafe {
-///
::core::mem::MaybeUninit::<$crate::bindings::Property>::zeroed().assume_init()
-/// },
+/// pub unsafe trait Zeroable: Default {
+/// const ZERO: Self = unsafe {
::core::mem::MaybeUninit::<Self>::zeroed().assume_init() };
+/// }
/// ```
///
/// The need for a manual implementation is only because `zeroed()` cannot
--
2.47.1
- [PULL 01/49] ci: enable rust in the Debian and Ubuntu system build job, (continued)
- [PULL 01/49] ci: enable rust in the Debian and Ubuntu system build job, Paolo Bonzini, 2024/12/11
- [PULL 02/49] rust: apply --cfg MESON to all crates, Paolo Bonzini, 2024/12/11
- [PULL 04/49] rust: build: move rustc_args.py invocation to qemu-api crate, Paolo Bonzini, 2024/12/11
- [PULL 05/49] rust: build: restrict --cfg generation to only required symbols, Paolo Bonzini, 2024/12/11
- [PULL 03/49] rust: allow using build-root bindings.rs from cargo, Paolo Bonzini, 2024/12/11
- [PULL 06/49] rust: build: generate lint flags from Cargo.toml, Paolo Bonzini, 2024/12/11
- [PULL 07/49] rust: cargo: store desired warning levels in workspace Cargo.toml, Paolo Bonzini, 2024/12/11
- [PULL 09/49] rust: fix a couple style issues from clippy, Paolo Bonzini, 2024/12/11
- [PULL 10/49] rust: build: establish a baseline of lints across all crates, Paolo Bonzini, 2024/12/11
- [PULL 11/49] rust: build: add "make clippy", "make rustfmt", "make rustdoc", Paolo Bonzini, 2024/12/11
- [PULL 13/49] rust: fix doc test syntax,
Paolo Bonzini <=
- [PULL 08/49] rust: build: move strict lints handling to rustc_args.py, Paolo Bonzini, 2024/12/11
- [PULL 14/49] rust/qemu-api: Fix fragment-specifiers in define_property macro, Paolo Bonzini, 2024/12/11
- [PULL 12/49] rust: ci: add job that runs Rust tools, Paolo Bonzini, 2024/12/11
- [PULL 15/49] clock: clear callback on unparent, Paolo Bonzini, 2024/12/11
- [PULL 18/49] kvm: remove unnecessary #ifdef, Paolo Bonzini, 2024/12/11
- [PULL 16/49] clock: treat outputs and inputs the same in NamedClockList, Paolo Bonzini, 2024/12/11
- [PULL 17/49] clock: inline most of qdev_init_clocklist, Paolo Bonzini, 2024/12/11
- [PULL 20/49] hw/block: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 19/49] arm: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11