Skip to content

Commit

Permalink
Revert "[rust] allow unused-macro-rules to unblock toolchain roll"
Browse files Browse the repository at this point in the history
This reverts commit 9d8f965.

Reason for revert: lint is allow-by-default after rust-lang/rust#97032

Original change's description:
> [rust] allow unused-macro-rules to unblock toolchain roll
>
> Bug: 100318
> Change-Id: Ided9428282c66e63cda934a5f456223750703179
> Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679506
> Reviewed-by: Joseph Ryan <josephry@google.com>
> Fuchsia-Auto-Submit: Dan Johnson <computerdruid@google.com>
> Reviewed-by: Tyler Mandry <tmandry@google.com>
> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>

Bug: 100318
Change-Id: I2ebf0b0e9c9e28d8a2588fc92dfe7428c77ca4cf
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679988
Reviewed-by: RubberStamper 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Dan Johnson <computerdruid@google.com>
Reviewed-by: Joseph Ryan <josephry@google.com>
  • Loading branch information
ComputerDruid authored and Fuchsia Internal LUCI committed May 17, 2022
1 parent c85c35c commit d0a5d16
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 30 deletions.
2 changes: 0 additions & 2 deletions src/connectivity/lib/internet-checksum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ type Accumulator = u64;
// on other platforms.
const SMALL_BUF_THRESHOLD: usize = 64;

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// The following macro unrolls operations on u16's to wider integers.
///
/// # Arguments
Expand Down
2 changes: 0 additions & 2 deletions src/connectivity/lib/packet-formats/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ macro_rules! __create_protocol_enum_inner {
};
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// Create an enum representing a protocol number (such as IP protocol or
/// EtherType).
///
Expand Down
2 changes: 0 additions & 2 deletions src/connectivity/lowpan/lib/spinel_pack/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ macro_rules! impl_try_array_owned_unpack_sized(
}
);

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! impl_try_pack_unpack_as_data(
(u8) => {
// We skip u8.
Expand Down
2 changes: 0 additions & 2 deletions src/connectivity/network/netstack3/core/src/ip/gmp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
// This macro is used by tests in both the `igmp` and `mld` modules.

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// Assert that the GMP state machine for `$group` is in the given state.
///
/// `$ctx` is a `context::testutil::DummyCtx` whose state contains a `groups:
Expand Down
2 changes: 0 additions & 2 deletions src/connectivity/network/netstack3/core/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

//! Macros used in Netstack3.
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! log_unimplemented {
($nocrash:expr, $fmt:expr $(,$arg:expr)*) => {{

Expand Down
2 changes: 0 additions & 2 deletions src/lib/cobalt/rust/src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ use {
},
};

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! gen_comment {
($x:expr) => {
#[doc = $x]
Expand Down
6 changes: 0 additions & 6 deletions src/lib/mundane/src/boringssl/abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
use std::fmt::Debug;

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! assert_abort {
($cond:expr) => ({
let cond = $cond;
Expand All @@ -32,8 +30,6 @@ macro_rules! assert_abort {
});
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! assert_abort_eq {
($left:expr, $right:expr) => ({
match (&$left, &$right) {
Expand Down Expand Up @@ -76,8 +72,6 @@ macro_rules! unreachable_abort {
}};
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! panic_abort {
() => ({
panic_abort!("explicit panic")
Expand Down
2 changes: 0 additions & 2 deletions src/lib/mundane/src/boringssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,6 @@ pub fn rsa_verify_pss_mgf1(
}
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// Implements `CStackWrapper` for a hash context type.
///
/// The caller provides doc comments, a public method name, and a private
Expand Down
2 changes: 0 additions & 2 deletions src/lib/mundane/src/boringssl/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ macro_rules! sealed {
};
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! impl_traits {
(@inner $name:ident, CNew => $fn:tt) => {
c_new!($name, $fn);
Expand Down
2 changes: 0 additions & 2 deletions src/lib/storage/vfs/rust/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ impl AsRef<str> for Path {
mod tests {
use super::*;

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
macro_rules! simple_construction_test {
(path: $str:expr, $path:ident => $body:block) => {
match Path::validate_and_split($str) {
Expand Down
2 changes: 0 additions & 2 deletions src/power/power-manager/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ macro_rules! define_float_unit {
};
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// Defines a measurement unit, with an underlying scalar type.
macro_rules! define_unit {
( $unit_type:ident, f32 ) => {
Expand Down
2 changes: 0 additions & 2 deletions src/proc/bin/starnix/fs/fs_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ macro_rules! fs_node_impl_symlink {
};
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// Implements [`FsNodeOps::set_xattr`] by delegating to another [`FsNodeOps`]
/// object.
macro_rules! fs_node_impl_xattr_delegate {
Expand Down
2 changes: 0 additions & 2 deletions src/proc/bin/starnix/mutable_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ impl<'a, B, S> ops::DerefMut for WritableState<'a, B, S> {
}
}

#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
/// This macro matches the methods inside a `state_implementation!` macro depending on their
/// visibility and mutability so that the `state_implementation!` might dispatch these to the right
/// trait or implementation.
Expand Down

0 comments on commit d0a5d16

Please sign in to comment.