From 189c60c649c42583a98cf39568524e92d9f22524 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 12 May 2022 21:44:58 -0700 Subject: [PATCH] Ignore unused_macro_rules warning in test macros warning: 2nd rule of macro `snapshot_impl` is never used --> tests/macros/mod.rs:44:5 | 44 | (($($expr:tt)*) as $t:ty, @$snapshot:literal) => {{ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_macro_rules)]` on by default warning: 1st rule of macro `snapshot_impl` is never used --> tests/macros/mod.rs:37:5 | 37 | (($expr:ident) as $t:ty, @$snapshot:literal) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: 3rd rule of macro `snapshot_impl` is never used --> tests/macros/mod.rs:52:5 | 52 | (($($expr:tt)*) , @$snapshot:literal) => {{ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: 2nd rule of macro `spanless_eq_enum` is never used --> tests/common/eq.rs:225:5 | 225 | / { 226 | | $($name:ident)::+; 227 | | $([$($variant:ident)::+; $($fields:tt)*])* 228 | | $next:ident [$([$($named:tt)*])* $(![$ignore:tt])*] (!$i:tt $($field:tt)*) 229 | | $($rest:tt)* 230 | | } => { | |_____^ | = note: `#[warn(unused_macro_rules)]` on by default --- tests/common/eq.rs | 2 ++ tests/macros/mod.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/common/eq.rs b/tests/common/eq.rs index 37ae1cfc32..f5d8517b09 100644 --- a/tests/common/eq.rs +++ b/tests/common/eq.rs @@ -1,3 +1,5 @@ +#![allow(unused_macro_rules)] + extern crate rustc_ast; extern crate rustc_data_structures; extern crate rustc_span; diff --git a/tests/macros/mod.rs b/tests/macros/mod.rs index 61cd67b882..5ca88b083b 100644 --- a/tests/macros/mod.rs +++ b/tests/macros/mod.rs @@ -1,4 +1,4 @@ -#![allow(unused_macros)] +#![allow(unused_macros, unused_macro_rules)] #[path = "../debug/mod.rs"] pub mod debug;