From 1f067c0237a5a50be95b6856f331cb30c0cd5bb7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 27 May 2022 16:41:57 +0100 Subject: [PATCH 1/2] tor-netdoc: Suppress new "unused_macro_rules" lint in one place The compiler can apparently tell that we aren't generating compile errors! Also that we're not yet using a feature provided here. (New lint in currently Nightly.) --- crates/tor-netdoc/src/parse/macros.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/tor-netdoc/src/parse/macros.rs b/crates/tor-netdoc/src/parse/macros.rs index b54f6ae1f..af95b33ba 100644 --- a/crates/tor-netdoc/src/parse/macros.rs +++ b/crates/tor-netdoc/src/parse/macros.rs @@ -21,6 +21,7 @@ /// assert_eq!(Location::from_str("start"), Location::START); /// assert_eq!(Location::from_str("stfff"), Location::UNRECOGNIZED); /// ``` +#[allow(unused_macro_rules)] macro_rules! decl_keyword { { $(#[$meta:meta])* $v:vis $name:ident { $( $($anno:ident)? $($s:literal)|+ => $i:ident),* $(,)? } } => { From 0173fce2e9b8b9b8f5abd1af58dcedddf8f5e106 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 27 May 2022 17:33:48 +0100 Subject: [PATCH 2/2] tor-netdoc: Allow suppressing unknown lints We want to supress the unused_macro_rules lint in one place but it's new in Nightly and this triggers yet another lint. --- crates/tor-netdoc/src/parse/macros.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/tor-netdoc/src/parse/macros.rs b/crates/tor-netdoc/src/parse/macros.rs index af95b33ba..abf10c3a9 100644 --- a/crates/tor-netdoc/src/parse/macros.rs +++ b/crates/tor-netdoc/src/parse/macros.rs @@ -1,5 +1,7 @@ //! Declares macros to help implementing parsers. +#![allow(unknown_lints)] + /// Macro for declaring a keyword enumeration to help parse a document. /// /// A keyword enumeration implements the Keyword trait.