mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
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:
committed by
Paolo Bonzini
parent
d58fcd05ff
commit
b0f6bf8a5b
@@ -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! {
|
||||
|
||||
Reference in New Issue
Block a user