Skip to content

Commit

Permalink
Merge #1720
Browse files Browse the repository at this point in the history
1720: Fix a warning on Redox with the latest nightly compiler. r=rtzoeller a=asomers

It just so happens that Redox doesn't use any of the libc_enum entries
that aren't followed by a comma.

Co-authored-by: Alan Somers <asomers@gmail.com>
  • Loading branch information
bors[bot] and asomers committed May 14, 2022
2 parents 6f57f2e + 7dff51f commit 1c36d49
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 1c36d49

Please sign in to comment.