Skip to content

Commit

Permalink
Yet another unused macro rules lint
Browse files Browse the repository at this point in the history
    warning: 1st rule of macro `generate_to_tokens` is never used
       --> src/macros.rs:120:5
        |
    120 |     (do_not_generate_to_tokens $($foo:tt)*) => ();
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(unused_macro_rules)]` on by default

    warning: 2nd rule of macro `generate_to_tokens` is never used
       --> src/macros.rs:122:5
        |
    122 | /     (
    123 | |         ($($arms:tt)*) $tokens:ident $name:ident {
    124 | |             $(#[cfg $cfg_attr:tt])*
    125 | |             $(#[doc $($doc_attr:tt)*])*
    ...   |
    128 | |         }
    129 | |     ) => {
        | |_____^
  • Loading branch information
dtolnay committed May 13, 2022
1 parent 209165e commit f1396f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ macro_rules! ast_enum_from_struct {
}

#[cfg(feature = "printing")]
#[cfg_attr(
not(any(feature = "full", feature = "derive")),
allow(unknown_lints, unused_macro_rules)
)]
macro_rules! generate_to_tokens {
(do_not_generate_to_tokens $($foo:tt)*) => ();

Expand Down

0 comments on commit f1396f5

Please sign in to comment.