rust: re-export qemu_macros internal helper in "bits"

Avoid the need to import "qemu_macros".

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Link: https://lore.kernel.org/r/20250827104147.717203-21-marcandre.lureau@redhat.com
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Marc-André Lureau 2025-09-08 12:50:01 +02:00 committed by Paolo Bonzini
parent d58fcd05ff
commit b0f6bf8a5b

View file

@ -380,14 +380,17 @@ macro_rules! bits {
};
{ $type:ty: $expr:expr } => {
::qemu_macros::bits_const_internal! { $type @ ($expr) }
$crate::bits_const_internal! { $type @ ($expr) }
};
{ $type:ty as $int_type:ty: $expr:expr } => {
(::qemu_macros::bits_const_internal! { $type @ ($expr) }.into_bits()) as $int_type
($crate::bits_const_internal! { $type @ ($expr) }.into_bits()) as $int_type
};
}
#[doc(hidden)]
pub use qemu_macros::bits_const_internal;
#[cfg(test)]
mod test {
bits! {