diff options
| author | bors <bors@rust-lang.org> | 2022-05-12 00:08:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-12 00:08:08 +0000 |
| commit | 0cd939e36c0696aad44a213566c9b152f0437020 (patch) | |
| tree | 2499fbc88c8efc1693dc46f1f9946a5921fec865 /compiler/rustc_macros/src/diagnostics/utils.rs | |
| parent | cb9cb4d4e10366ea2ce13813fff26b90ab3fec1d (diff) | |
| parent | 493af0b54f97840d3123a4020d178effdf841379 (diff) | |
| download | rust-0cd939e36c0696aad44a213566c9b152f0437020.tar.gz rust-0cd939e36c0696aad44a213566c9b152f0437020.zip | |
Auto merge of #96150 - est31:unused_macro_rules, r=petrochenkov
Implement a lint to warn about unused macro rules
This implements a new lint to warn about unused macro rules (arms/matchers), similar to the `unused_macros` lint added by #41907 that warns about entire macros.
```rust
macro_rules! unused_empty {
(hello) => { println!("Hello, world!") };
() => { println!("empty") }; //~ ERROR: 1st rule of macro `unused_empty` is never used
}
fn main() {
unused_empty!(hello);
}
```
Builds upon #96149 and #96156.
Fixes #73576
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/utils.rs')
0 files changed, 0 insertions, 0 deletions
