rust/compiler
Matthias Krüger 673d45124b
Rollup merge of #97032 - est31:unused_macro_rules, r=petrochenkov
Allow the unused_macro_rules lint for now

It was newly added by #96150 with warn by default, which is great as it gave exposure to the community, and their feedback gave me ideas for improvements.

Allowing the lint is good for two reasons:

* It makes the transition easier as e.g. allow directives won't fire the unknown lint warning once it is turned to warn by default in the future. The [commit that allowed the lint in fuchsia](https://fuchsia.googlesource.com/fuchsia/+/9d8f96517c3963de2f0e25598fd36061914524cd%5E%21/) had to allow unknown lints for example.
This is especially important compared to other lints in the unused group,
because the _ prefix trick doesn't exist for macro rules, allowing is the
only option (either of unused_macro_rules, or of the entire unused group,
but that is not as informative to readers). Allowing the lint also makes it
possible to work on possible heuristics for disabling the macro in specific
cases.
* It gives time for implementing heuristics for when to suppress the lint, e.g.
when `compile_error!` is invoked by that arm (so it's only there to yield an error).

See: https://github.com/rust-lang/rust/pull/96150#issuecomment-1126599107

I would also like this to be backported to the 1.62 beta branch (cc #97016).
2022-05-15 08:10:42 +02:00
..
rustc Propagate parallel_compiler feature through rustc crates. Turned off feature gives change of builded crates: 238 -> 224. 2022-03-28 08:41:12 +03:00
rustc_apfloat Addressed comments by @compiler-errors and @bjorn3 2022-03-30 17:04:46 -04:00
rustc_arena mark FIXMES for all the places found that are probably offset_from 2022-03-29 20:18:28 -04:00
rustc_ast ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_ast_lowering Auto merge of #96770 - flip1995:fix-trait-type-in-bounds, r=cjgillot 2022-05-08 14:10:12 +00:00
rustc_ast_passes Feature-gate do yeet inside cfgs too 2022-04-30 18:10:01 -07:00
rustc_ast_pretty ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_attr only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_borrowck Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_builtin_macros ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_codegen_cranelift Rename unsigned_offset_from to sub_ptr 2022-05-11 17:16:25 -07:00
rustc_codegen_gcc Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
rustc_codegen_llvm Add LLVM based mingw-w64 targets 2022-05-13 20:14:15 +02:00
rustc_codegen_ssa Auto merge of #96930 - ayrtonm:mips32-tmp-file, r=petrochenkov 2022-05-13 08:48:31 +00:00
rustc_const_eval Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_data_structures Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors 2022-05-07 06:30:29 +00:00
rustc_driver errors: lazily load fallback fluent bundle 2022-04-13 02:44:59 +01:00
rustc_error_codes Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
rustc_error_messages typeck: port "no resolve overridden impl substs" 2022-05-12 07:21:51 +01:00
rustc_errors errors: set_arg takes IntoDiagnosticArg 2022-05-12 07:21:51 +01:00
rustc_expand Use pluralize in one instance 2022-05-13 08:48:35 +02:00
rustc_feature change some attrs to only_local 2022-05-10 12:07:36 +02:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz update graphviz links 2022-05-12 18:31:42 +09:00
rustc_hir Replace DefPathData::Misc by two appropriately-named variants. 2022-05-12 20:12:35 +02:00
rustc_hir_pretty Store all generic bounds as where predicates. 2022-04-30 13:55:13 +02:00
rustc_incremental only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_index Add element iterator for ChunkedBitSet 2022-04-30 16:40:49 +02:00
rustc_infer Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_interface only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_lexer Reduce max hash in raw strings from u16 to u8 2022-03-23 22:13:55 +01:00
rustc_lint Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwco 2022-05-12 12:48:30 +00:00
rustc_lint_defs Allow the unused_macro_rules lint for now 2022-05-14 12:31:14 +02:00
rustc_llvm Add LLVM based mingw-w64 targets 2022-05-13 20:14:15 +02:00
rustc_log rustc_log: add env var to set verbose entry/exit behavior 2022-05-11 09:14:31 +02:00
rustc_macros errors: set_arg takes IntoDiagnosticArg 2022-05-12 07:21:51 +01:00
rustc_metadata only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_middle Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_mir_build Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_mir_dataflow only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_mir_transform Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_monomorphize only_local: always check for misuse 2022-05-10 12:07:35 +02:00
rustc_parse ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
rustc_parse_format Make rustc_parse_format compile on stable 2022-05-03 11:26:58 +02:00
rustc_passes fix typo 2022-05-10 12:07:36 +02:00
rustc_plugin_impl replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
rustc_privacy rustc: Panic by default in DefIdTree::parent 2022-05-02 01:56:50 +03:00
rustc_query_impl Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
rustc_query_system Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors 2022-05-07 06:30:29 +00:00
rustc_resolve Auto merge of #97039 - cjgillot:no-rpit-hrtb, r=jackh726 2022-05-14 15:47:22 +00:00
rustc_save_analysis [save-analysis] Reference the variant not enum at struct-literal construction. 2022-05-12 16:34:02 -07:00
rustc_serialize Remove unused macro rules 2022-04-18 23:28:06 +02:00
rustc_session sess: add create_{err,warning} 2022-05-06 03:44:41 +01:00
rustc_span Add unsigned_offset_from on pointers 2022-05-11 17:16:25 -07:00
rustc_symbol_mangling Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_target Add LLVM based mingw-w64 targets 2022-05-13 20:14:15 +02:00
rustc_trait_selection Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_traits Add bound_impl_trait_ref 2022-05-13 18:27:40 -04:00
rustc_ty_utils Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00
rustc_type_ir fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
rustc_typeck Auto merge of #96883 - jackh726:early-binder-2, r=oli-obk 2022-05-14 23:53:11 +00:00