Never regard macro rules with compile_error! invocations as unused The very point of compile_error! is to never be reached, and one of the use cases of the macro, currently also listed as examples in the documentation of compile_error, is to create nicer errors for wrong macro invocations. Thus, we should never warn about unused macro arms that contain invocations of compile_error. See also https://github.com/rust-lang/rust/pull/96150#issuecomment-1126599107 and the discussion after that. Furthermore, the PR also contains two commits to silence `unused_macro_rules` when a macro has an invalid rule, and to add a test that `unused_macros` does not behave badly in the same situation. r? `@petrochenkov` as I've talked to them about this |
||
|---|---|---|
| .. | ||
| diagnostics | ||
| late | ||
| access_levels.rs | ||
| build_reduced_graph.rs | ||
| check_unused.rs | ||
| def_collector.rs | ||
| diagnostics.rs | ||
| ident.rs | ||
| imports.rs | ||
| late.rs | ||
| lib.rs | ||
| macros.rs | ||