rust/compiler/rustc_resolve/src
bors fa68e73e99 Auto merge of #97903 - est31:unused_macro_rules_compile_error, r=petrochenkov
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
2022-06-11 08:46:21 +00:00
..
diagnostics Implement the unused_macro_rules lint 2022-05-05 19:13:00 +02:00
late Rollup merge of #97812 - TaKO8Ki:suggest-to-swap-struct-and-trait, r=estebank 2022-06-11 07:42:14 +02:00
access_levels.rs resolve/metadata: Stop encoding macros as reexports 2022-02-24 22:55:40 +03:00
build_reduced_graph.rs Never regard macro rules with compile_error! invocations as unused 2022-06-09 23:21:06 +02:00
check_unused.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
def_collector.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
diagnostics.rs Rollup merge of #97264 - TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate, r=estebank 2022-06-01 17:11:05 +02:00
ident.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
imports.rs Rollup merge of #97264 - TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate, r=estebank 2022-06-01 17:11:05 +02:00
late.rs Rollup merge of #97812 - TaKO8Ki:suggest-to-swap-struct-and-trait, r=estebank 2022-06-11 07:42:14 +02:00
lib.rs Auto merge of #95565 - jackh726:remove-borrowck-mode, r=nikomatsakis 2022-06-07 05:04:14 +00:00
macros.rs Never regard macro rules with compile_error! invocations as unused 2022-06-09 23:21:06 +02:00