Skip to content

Commit 9f3dd81

Browse files
asomersrtzoeller
authored andcommitted
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 a40a0fb commit 9f3dd81

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/macros.rs

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ macro_rules! libc_bitflags {
9494
/// }
9595
/// }
9696
/// ```
97+
// Some targets don't use all rules.
98+
#[allow(unknown_lints)]
99+
#[allow(unused_macro_rules)]
97100
macro_rules! libc_enum {
98101
// Exit rule.
99102
(@make_enum

src/sys/socket/sockopt.rs

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ 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(unknown_lints)]
134+
#[allow(unused_macro_rules)]
132135
macro_rules! sockopt_impl {
133136
($(#[$attr:meta])* $name:ident, GetOnly, $level:expr, $flag:path, bool) => {
134137
sockopt_impl!($(#[$attr])*

0 commit comments

Comments
 (0)