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:
parent
d58fcd05ff
commit
b0f6bf8a5b
1 changed files with 5 additions and 2 deletions
|
|
@ -380,14 +380,17 @@ macro_rules! bits {
|
||||||
};
|
};
|
||||||
|
|
||||||
{ $type:ty: $expr:expr } => {
|
{ $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 } => {
|
{ $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)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
bits! {
|
bits! {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue