Skip to content

Commit 9d8f965

Browse files
ComputerDruidCommit Bot
authored andcommitted
[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 <[email protected]> Fuchsia-Auto-Submit: Dan Johnson <[email protected]> Reviewed-by: Tyler Mandry <[email protected]> Commit-Queue: Auto-Submit <[email protected]>
1 parent 04e4388 commit 9d8f965

File tree

13 files changed

+30
-0
lines changed

13 files changed

+30
-0
lines changed

src/connectivity/lib/internet-checksum/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ type Accumulator = u64;
161161
// on other platforms.
162162
const SMALL_BUF_THRESHOLD: usize = 64;
163163

164+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
165+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
164166
/// The following macro unrolls operations on u16's to wider integers.
165167
///
166168
/// # Arguments

src/connectivity/lib/packet-formats/src/macros.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ macro_rules! __create_protocol_enum_inner {
226226
};
227227
}
228228

229+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
230+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
229231
/// Create an enum representing a protocol number (such as IP protocol or
230232
/// EtherType).
231233
///

src/connectivity/lowpan/lib/spinel_pack/src/primitives.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ macro_rules! impl_try_array_owned_unpack_sized(
2727
}
2828
);
2929

30+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
31+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
3032
macro_rules! impl_try_pack_unpack_as_data(
3133
(u8) => {
3234
// We skip u8.

src/connectivity/network/netstack3/core/src/ip/gmp/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
1818
// This macro is used by tests in both the `igmp` and `mld` modules.
1919

20+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
21+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
2022
/// Assert that the GMP state machine for `$group` is in the given state.
2123
///
2224
/// `$ctx` is a `context::testutil::DummyCtx` whose state contains a `groups:

src/connectivity/network/netstack3/core/src/macros.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

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

src/lib/cobalt/rust/src/sender.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ use {
1616
},
1717
};
1818

19+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
20+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
1921
macro_rules! gen_comment {
2022
($x:expr) => {
2123
#[doc = $x]

src/lib/mundane/src/boringssl/abort.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
1515
use std::fmt::Debug;
1616

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

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

79+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
80+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
7581
macro_rules! panic_abort {
7682
() => ({
7783
panic_abort!("explicit panic")

src/lib/mundane/src/boringssl/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,8 @@ pub fn rsa_verify_pss_mgf1(
798798
}
799799
}
800800

801+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
802+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
801803
/// Implements `CStackWrapper` for a hash context type.
802804
///
803805
/// The caller provides doc comments, a public method name, and a private

src/lib/mundane/src/boringssl/wrapper.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ macro_rules! sealed {
2020
};
2121
}
2222

23+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
24+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
2325
macro_rules! impl_traits {
2426
(@inner $name:ident, CNew => $fn:tt) => {
2527
c_new!($name, $fn);

src/lib/storage/vfs/rust/src/path.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ impl AsRef<str> for Path {
182182
mod tests {
183183
use super::*;
184184

185+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
186+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
185187
macro_rules! simple_construction_test {
186188
(path: $str:expr, $path:ident => $body:block) => {
187189
match Path::validate_and_split($str) {

src/power/power-manager/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ macro_rules! define_float_unit {
5050
};
5151
}
5252

53+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
54+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
5355
/// Defines a measurement unit, with an underlying scalar type.
5456
macro_rules! define_unit {
5557
( $unit_type:ident, f32 ) => {

src/proc/bin/starnix/fs/fs_node.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ macro_rules! fs_node_impl_symlink {
234234
};
235235
}
236236

237+
#[allow(unknown_lints)] // TODO(fxbug.dev/99424): remove this after toolchain roll when lint is known
238+
#[allow(unused_macro_rules)] // TODO(fxbug.dev/100318): remove unused macro rules and re-enable
237239
/// Implements [`FsNodeOps::set_xattr`] by delegating to another [`FsNodeOps`]
238240
/// object.
239241
macro_rules! fs_node_impl_xattr_delegate {

src/proc/bin/starnix/mutable_state.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ impl<'a, B, S> ops::DerefMut for WritableState<'a, B, S> {
275275
}
276276
}
277277

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

0 commit comments

Comments
 (0)