From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org
Subject: [PATCH] rust: hide panicking default associated constants from rustdoc
Date: Thu, 4 Dec 2025 11:50:17 +0100 [thread overview]
Message-ID: <20251204105017.2564277-1-pbonzini@redhat.com> (raw)
Work around rustdoc issue that panics while trying to evaluate
the constants.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
rust/hw/core/src/qdev.rs | 1 +
rust/migration/src/vmstate.rs | 1 +
2 files changed, 2 insertions(+)
diff --git a/rust/hw/core/src/qdev.rs b/rust/hw/core/src/qdev.rs
index 4e983da28b7..c2ca17f6ce0 100644
--- a/rust/hw/core/src/qdev.rs
+++ b/rust/hw/core/src/qdev.rs
@@ -132,6 +132,7 @@ pub trait ResettablePhasesImpl {
/// [`bindings::PropertyInfo`] pointer for the trait implementation to be safe.
pub unsafe trait QDevProp {
const BASE_INFO: *const bindings::PropertyInfo;
+ #[doc(hidden)] // https://github.com/rust-lang/rust/issues/149635
const BIT_INFO: *const bindings::PropertyInfo = {
panic!("invalid type for bit property");
};
diff --git a/rust/migration/src/vmstate.rs b/rust/migration/src/vmstate.rs
index 267f9c8e053..f9d9f335b98 100644
--- a/rust/migration/src/vmstate.rs
+++ b/rust/migration/src/vmstate.rs
@@ -101,6 +101,7 @@ pub unsafe trait VMState {
/// type for the length (i.e. if it is not `u8`, `u16`, `u32`), using it
/// in a call to [`vmstate_of!`](crate::vmstate_of) will cause a
/// compile-time error.
+ #[doc(hidden)] // https://github.com/rust-lang/rust/issues/149635
const VARRAY_FLAG: VMStateFlags = {
panic!("invalid type for variable-sized array");
};
--
2.52.0
next reply other threads:[~2025-12-04 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 10:50 Paolo Bonzini [this message]
2025-12-08 3:36 ` [PATCH] rust: hide panicking default associated constants from rustdoc Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251204105017.2564277-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).