summary refs log tree commit diff stats
path: root/rust/bits/src
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2025-09-08 12:50:01 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-09-17 19:00:57 +0200
commitb0f6bf8a5b3b3a9dd4a11f792084d39a76b4b007 (patch)
treee2e175ad8efc7c0e26eb4f626ffbf6db7ff5f8ab /rust/bits/src
parentd58fcd05ffc682fbad02cd8d0bee840cb7997e3e (diff)
downloadfocaccia-qemu-b0f6bf8a5b3b3a9dd4a11f792084d39a76b4b007.tar.gz
focaccia-qemu-b0f6bf8a5b3b3a9dd4a11f792084d39a76b4b007.zip
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>
Diffstat (limited to 'rust/bits/src')
-rw-r--r--rust/bits/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/rust/bits/src/lib.rs b/rust/bits/src/lib.rs
index 1bc882fde1..d1141f7c88 100644
--- a/rust/bits/src/lib.rs
+++ b/rust/bits/src/lib.rs
@@ -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! {