qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: hide panicking default associated constants from rustdoc
@ 2025-12-04 10:50 Paolo Bonzini
  2025-12-08  3:36 ` Zhao Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2025-12-04 10:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-rust

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rust: hide panicking default associated constants from rustdoc
  2025-12-04 10:50 [PATCH] rust: hide panicking default associated constants from rustdoc Paolo Bonzini
@ 2025-12-08  3:36 ` Zhao Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Zhao Liu @ 2025-12-08  3:36 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, qemu-rust

On Thu, Dec 04, 2025 at 11:50:17AM +0100, Paolo Bonzini wrote:
> Date: Thu,  4 Dec 2025 11:50:17 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] rust: hide panicking default associated constants from
>  rustdoc
> X-Mailer: git-send-email 2.52.0
> 
> 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(+)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-08  3:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 10:50 [PATCH] rust: hide panicking default associated constants from rustdoc Paolo Bonzini
2025-12-08  3:36 ` Zhao Liu

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).