mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
rust: hide panicking default associated constants from rustdoc
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>
This commit is contained in:
@@ -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");
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user