Rollup merge of #153717 - ralpha:unused_macro_rules-lint-correction, r=TaKO8Ki

unused_macro_rules switched used and unused comments

Incorrect swapping of "used" and "unused".

The lint example:
```rust
#[warn(unused_macro_rules)]
macro_rules! unused_empty {
    (hello) => { println!("Hello, world!") }; // This rule is unused
    () => { println!("empty") }; // This rule is used
}

fn main() {
    unused_empty!(hello);
}
```

It is clearly using the `(hello)` case. Yet it is labeled as "unused".
This PR fixed that small issue and corrects the mistake.
This commit is contained in:
Jonathan Brouwer
2026-03-12 12:31:42 +01:00
committed by GitHub
+2 -2
View File
@@ -1033,8 +1033,8 @@
/// ```rust
/// #[warn(unused_macro_rules)]
/// macro_rules! unused_empty {
/// (hello) => { println!("Hello, world!") }; // This rule is unused
/// () => { println!("empty") }; // This rule is used
/// (hello) => { println!("Hello, world!") }; // This rule is used
/// () => { println!("empty") }; // This rule is unused
/// }
///
/// fn main() {