-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused macro rules #96149
Remove unused macro rules #96149
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
bebd139
to
9a915bc
Compare
9a915bc
to
3c1e166
Compare
This is a prerequisite for #96150. r? @petrochenkov |
@bors r+ rollup |
📌 Commit 3c1e166 has been approved by |
… r=petrochenkov Remove unused macro rules Removes rules of internal macros that weren't triggered.
Rollup of 6 pull requests Successful merges: - rust-lang#90312 (Fix some confusing wording and improve slice-search-related docs) - rust-lang#96149 (Remove unused macro rules) - rust-lang#96279 (rustdoc: Remove .woff font files) - rust-lang#96355 (Better handle too many `#` recovery in raw str) - rust-lang#96379 (delay bug when adjusting `NeverToAny` twice during diagnostic code) - rust-lang#96384 (do not consider two extern types to be similar) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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 rust-lang#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 ~~(and currently integrates)~~ rust-lang#96149 and rust-lang#96156. Fixes rust-lang#73576
…enkov 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 rust-lang#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 rust-lang#96149 and rust-lang#96156. Fixes rust-lang#73576
…enkov 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 rust-lang#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 rust-lang#96149 and rust-lang#96156. Fixes rust-lang#73576
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 rust-lang#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 rust-lang#96149 and rust-lang#96156. Fixes rust-lang#73576
Removes rules of internal macros that weren't triggered.