Skip to content

unused_macro_rules switched used and unused comments#153717

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
ralpha:unused_macro_rules-lint-correction
Mar 12, 2026
Merged

unused_macro_rules switched used and unused comments#153717
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
ralpha:unused_macro_rules-lint-correction

Conversation

@ralpha
Copy link
Contributor

@ralpha ralpha commented Mar 11, 2026

Incorrect swapping of "used" and "unused".

The lint example:

#[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.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 16 candidates

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Mar 12, 2026

Thank you. @bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 12, 2026

📌 Commit 9fcec02 has been approved by TaKO8Ki

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 12, 2026
…rection, 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.
rust-bors bot pushed a commit that referenced this pull request Mar 12, 2026
Rollup of 7 pull requests

Successful merges:

 - #153736 (add test that an incomplete feature emits a warning)
 - #153160 (Fix relative extern URL depth on source pages)
 - #153432 (Fix some comments about dataflow analysis.)
 - #153694 (fix(query): Pass Query Key to `value_from_cycle_error`)
 - #153717 (unused_macro_rules switched used and unused comments)
 - #153748 (editorconfig: css uses tabs)
 - #153750 (rustc-dev-guide subtree update)
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 12, 2026
…rection, 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.
rust-bors bot pushed a commit that referenced this pull request Mar 12, 2026
Rollup of 11 pull requests

Successful merges:

 - #153726 (Add optional CI job to build the compiler with the parallel frontend)
 - #153763 (Don't add empty target features for target-cpu=native on macOS)
 - #153432 (Fix some comments about dataflow analysis.)
 - #153529 (Fix LegacyKeyValueFormat report from docker build: pr)
 - #153694 (fix(query): Pass Query Key to `value_from_cycle_error`)
 - #153708 (de-non_const `Iterator` trait methods)
 - #153717 (unused_macro_rules switched used and unused comments)
 - #153736 (add test that an incomplete feature emits a warning)
 - #153748 (editorconfig: css uses tabs)
 - #153750 (rustc-dev-guide subtree update)
 - #153762 (actually make the is-fn test test what it says it tests)
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 12, 2026
…rection, 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.
rust-bors bot pushed a commit that referenced this pull request Mar 12, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #153726 (Add optional CI job to build the compiler with the parallel frontend)
 - #153763 (Don't add empty target features for target-cpu=native on macOS)
 - #153432 (Fix some comments about dataflow analysis.)
 - #153529 (Fix LegacyKeyValueFormat report from docker build: pr)
 - #153694 (fix(query): Pass Query Key to `value_from_cycle_error`)
 - #153717 (unused_macro_rules switched used and unused comments)
 - #153736 (add test that an incomplete feature emits a warning)
 - #153748 (editorconfig: css uses tabs)
 - #153750 (rustc-dev-guide subtree update)
 - #153762 (actually make the is-fn test test what it says it tests)
@rust-bors rust-bors bot merged commit 9488c30 into rust-lang:main Mar 12, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 12, 2026
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Mar 16, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#153726 (Add optional CI job to build the compiler with the parallel frontend)
 - rust-lang/rust#153763 (Don't add empty target features for target-cpu=native on macOS)
 - rust-lang/rust#153432 (Fix some comments about dataflow analysis.)
 - rust-lang/rust#153529 (Fix LegacyKeyValueFormat report from docker build: pr)
 - rust-lang/rust#153694 (fix(query): Pass Query Key to `value_from_cycle_error`)
 - rust-lang/rust#153717 (unused_macro_rules switched used and unused comments)
 - rust-lang/rust#153736 (add test that an incomplete feature emits a warning)
 - rust-lang/rust#153748 (editorconfig: css uses tabs)
 - rust-lang/rust#153750 (rustc-dev-guide subtree update)
 - rust-lang/rust#153762 (actually make the is-fn test test what it says it tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants