From 62f35c2648bc27645e0d6bffa55cf657829bfd03 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Fri, 24 May 2019 16:51:56 -0700 Subject: Allow import of Linux macros in Rust2018 Finish off the work started in 8c9ac5a70 allowing the use of macros without needing to import local inner macros. --- src/sys/ioctl/linux.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sys') diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs index 750a1c98..9cdac72a 100644 --- a/src/sys/ioctl/linux.rs +++ b/src/sys/ioctl/linux.rs @@ -93,7 +93,7 @@ macro_rules! ioc { /// ioctl_write_int_bad!(kvm_create_vm, request_code_none!(KVMIO, 0x03)); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! request_code_none { ($ty:expr, $nr:expr) => (ioc!($crate::sys::ioctl::NONE, $ty, $nr, 0)) } @@ -108,7 +108,7 @@ macro_rules! request_code_none { /// The read/write direction is relative to userland, so this /// command would be userland is reading and the kernel is /// writing. -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! request_code_read { ($ty:expr, $nr:expr, $sz:expr) => (ioc!($crate::sys::ioctl::READ, $ty, $nr, $sz)) } @@ -123,7 +123,7 @@ macro_rules! request_code_read { /// The read/write direction is relative to userland, so this /// command would be userland is writing and the kernel is /// reading. -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! request_code_write { ($ty:expr, $nr:expr, $sz:expr) => (ioc!($crate::sys::ioctl::WRITE, $ty, $nr, $sz)) } @@ -134,7 +134,7 @@ macro_rules! request_code_write { /// /// You should only use this macro directly if the `ioctl` you're working /// with is "bad" and you cannot use `ioctl_readwrite!()` directly. -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! request_code_readwrite { ($ty:expr, $nr:expr, $sz:expr) => (ioc!($crate::sys::ioctl::READ | $crate::sys::ioctl::WRITE, $ty, $nr, $sz)) } -- cgit v1.2.3