Skip to content

Commit f4c5d1d

Browse files
committed
Fix "unused_macro_rules" warnings with the latest nightly compiler.
It just so happens that Redox, OpenBSD, Dragonfly, and uclibc don't use some of the rules for two internal macros.
1 parent 6f57f2e commit f4c5d1d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/macros.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ macro_rules! libc_bitflags {
9494
/// }
9595
/// }
9696
/// ```
97+
// Some targets don't use all rules.
98+
#[allow(unused_macro_rules)]
9799
macro_rules! libc_enum {
98100
// Exit rule.
99101
(@make_enum

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ macro_rules! getsockopt_impl {
129129
/// * `$ty:ty`: type of the value that will be get/set.
130130
/// * `$getter:ty`: `Get` implementation; optional; only for `GetOnly` and `Both`.
131131
/// * `$setter:ty`: `Set` implementation; optional; only for `SetOnly` and `Both`.
132+
// Some targets don't use all rules.
133+
#[allow(unused_macro_rules)]
132134
macro_rules! sockopt_impl {
133135
($(#[$attr:meta])* $name:ident, GetOnly, $level:expr, $flag:path, bool) => {
134136
sockopt_impl!($(#[$attr])*

0 commit comments

Comments
 (0)