diff options
author | Andy Russell <arussell123@gmail.com> | 2019-04-02 15:03:35 -0400 |
---|---|---|
committer | Andy Russell <arussell123@gmail.com> | 2019-04-04 14:00:59 -0400 |
commit | 8c9ac5a703486ab35e0f119af4dd5e2dc8cc00f5 (patch) | |
tree | f206dad8ee021efee5b1bc328e94e601147d6361 /src/sys/ioctl/mod.rs | |
parent | 0059ddf435005c04e2caeb3dd0313d317a56e000 (diff) | |
download | nix-8c9ac5a703486ab35e0f119af4dd5e2dc8cc00f5.zip |
export helper macros via `local_inner_macros`
This will allow users of the 2018 edition to import the macros without
needing to also import their helpers.
Diffstat (limited to 'src/sys/ioctl/mod.rs')
-rw-r--r-- | src/sys/ioctl/mod.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index 35d508b1..4513bf87 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -287,7 +287,7 @@ macro_rules! convert_ioctl_res { /// ioctl_none!(log_status, b'V', 70); /// fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_none { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr) => ( $(#[$attr])* @@ -328,7 +328,7 @@ macro_rules! ioctl_none { /// } /// ``` // TODO: add an example using request_code_*!() -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_none_bad { ($(#[$attr:meta])* $name:ident, $nr:expr) => ( $(#[$attr])* @@ -365,7 +365,7 @@ macro_rules! ioctl_none_bad { /// ioctl_read!(spi_read_mode, SPI_IOC_MAGIC, SPI_IOC_TYPE_MODE, u8); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_read { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -402,7 +402,7 @@ macro_rules! ioctl_read { /// ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_read_bad { ($(#[$attr:meta])* $name:ident, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -439,7 +439,7 @@ macro_rules! ioctl_read_bad { /// ioctl_write_ptr!(s_audio, b'V', 34, v4l2_audio); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_write_ptr { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -476,7 +476,7 @@ macro_rules! ioctl_write_ptr { /// ioctl_write_ptr_bad!(tcsets, libc::TCSETS, libc::termios); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_write_ptr_bad { ($(#[$attr:meta])* $name:ident, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -517,7 +517,7 @@ cfg_if!{ /// ioctl_write_int!(vt_activate, b'v', 4); /// # fn main() {} /// ``` - #[macro_export] + #[macro_export(local_inner_macros)] macro_rules! ioctl_write_int { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr) => ( $(#[$attr])* @@ -558,7 +558,7 @@ cfg_if!{ /// ioctl_write_int!(hci_dev_up, HCI_IOC_MAGIC, HCI_IOC_HCIDEVUP); /// # fn main() {} /// ``` - #[macro_export] + #[macro_export(local_inner_macros)] macro_rules! ioctl_write_int { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr) => ( $(#[$attr])* @@ -603,7 +603,7 @@ cfg_if!{ /// ioctl_write_int_bad!(kvm_create_vm, request_code_none!(KVMIO, 0x03)); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_write_int_bad { ($(#[$attr:meta])* $name:ident, $nr:expr) => ( $(#[$attr])* @@ -640,7 +640,7 @@ macro_rules! ioctl_write_int_bad { /// ioctl_readwrite!(enum_audio, b'V', 65, v4l2_audio); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_readwrite { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -668,7 +668,7 @@ macro_rules! ioctl_readwrite { /// /// For a more in-depth explanation of ioctls, see [`::sys::ioctl`](sys/ioctl/index.html). // TODO: Find an example for ioctl_readwrite_bad -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_readwrite_bad { ($(#[$attr:meta])* $name:ident, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -697,7 +697,7 @@ macro_rules! ioctl_readwrite_bad { /// /// For a more in-depth explanation of ioctls, see [`::sys::ioctl`](sys/ioctl/index.html). // TODO: Find an example for ioctl_read_buf -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_read_buf { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -736,7 +736,7 @@ macro_rules! ioctl_read_buf { /// ioctl_write_buf!(spi_transfer, SPI_IOC_MAGIC, SPI_IOC_TYPE_MESSAGE, spi_ioc_transfer); /// # fn main() {} /// ``` -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_write_buf { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr, $ty:ty) => ( $(#[$attr])* @@ -765,7 +765,7 @@ macro_rules! ioctl_write_buf { /// /// For a more in-depth explanation of ioctls, see [`::sys::ioctl`](sys/ioctl/index.html). // TODO: Find an example for readwrite_buf -#[macro_export] +#[macro_export(local_inner_macros)] macro_rules! ioctl_readwrite_buf { ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr, $ty:ty) => ( $(#[$attr])* |