Skip to content

Commit

Permalink
Fix "unused_macro_rules" warnings with the latest nightly compiler.
Browse files Browse the repository at this point in the history
It just so happens that Redox, OpenBSD, Dragonfly, and uclibc don't use
some of the rules for two internal macros.
  • Loading branch information
asomers authored and rtzoeller committed Jul 17, 2022
1 parent a40a0fb commit 9f3dd81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/macros.rs
Expand Up @@ -94,6 +94,9 @@ macro_rules! libc_bitflags {
/// }
/// }
/// ```
// Some targets don't use all rules.
#[allow(unknown_lints)]
#[allow(unused_macro_rules)]
macro_rules! libc_enum {
// Exit rule.
(@make_enum
Expand Down
3 changes: 3 additions & 0 deletions src/sys/socket/sockopt.rs
Expand Up @@ -129,6 +129,9 @@ macro_rules! getsockopt_impl {
/// * `$ty:ty`: type of the value that will be get/set.
/// * `$getter:ty`: `Get` implementation; optional; only for `GetOnly` and `Both`.
/// * `$setter:ty`: `Set` implementation; optional; only for `SetOnly` and `Both`.
// Some targets don't use all rules.
#[allow(unknown_lints)]
#[allow(unused_macro_rules)]
macro_rules! sockopt_impl {
($(#[$attr:meta])* $name:ident, GetOnly, $level:expr, $flag:path, bool) => {
sockopt_impl!($(#[$attr])*
Expand Down

0 comments on commit 9f3dd81

Please sign in to comment.