mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
rust: re-export qemu macros from common/qom/hwcore
This is just a bit nicer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Link: https://lore.kernel.org/r/20250827104147.717203-22-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
b0f6bf8a5b
commit
e4444d71e8
@@ -14,6 +14,7 @@ rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
libc.workspace = true
|
||||
qemu_macros = { path = "../qemu-macros" }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -19,7 +19,7 @@ _common_rs = static_library(
|
||||
override_options: ['rust_std=2021', 'build.rust_std=2021'],
|
||||
rust_abi: 'rust',
|
||||
rust_args: _common_cfg,
|
||||
dependencies: [libc_rs],
|
||||
dependencies: [libc_rs, qemu_macros],
|
||||
)
|
||||
|
||||
common_rs = declare_dependency(link_with: [_common_rs])
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
pub use qemu_macros::{TryInto, Wrapper};
|
||||
|
||||
pub mod assertions;
|
||||
|
||||
pub mod bitops;
|
||||
|
||||
@@ -192,7 +192,7 @@ impl<T: Default> Opaque<T> {
|
||||
|
||||
/// Annotates [`Self`] as a transparent wrapper for another type.
|
||||
///
|
||||
/// Usually defined via the [`qemu_macros::Wrapper`] derive macro.
|
||||
/// Usually defined via the [`crate::Wrapper`] derive macro.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@@ -227,8 +227,6 @@ impl<T: Default> Opaque<T> {
|
||||
/// ```
|
||||
///
|
||||
/// They are not defined here to allow them to be `const`.
|
||||
///
|
||||
/// [`qemu_macros::Wrapper`]: ../../qemu_macros/derive.Wrapper.html
|
||||
pub unsafe trait Wrapper {
|
||||
type Wrapped;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user