]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
rust: hide panicking default associated constants from rustdoc
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Dec 2025 09:19:00 +0000 (10:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 27 Dec 2025 09:11:09 +0000 (10:11 +0100)
Work around rustdoc issue that panics while trying to evaluate
the constants.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/hw/core/src/qdev.rs
rust/migration/src/vmstate.rs

index 4e983da28b76c8295260120afb67a3b560ca2040..c2ca17f6ce07f468dd978a8425d2226c19cb8922 100644 (file)
@@ -132,6 +132,7 @@ unsafe extern "C" fn rust_resettable_exit_fn<T: 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");
     };
index 267f9c8e053a31cfa69404fab353fb375e9634c0..f9d9f335b988bb0b60e18575f7a1bfc385755c62 100644 (file)
@@ -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");
     };