rust/compiler
Matthias Krüger 42cdc7df20
Rollup merge of #114413 - CohenArthur:warn-macro-export-decl-macros, r=cjgillot
Warn when #[macro_export] is applied on decl macros

The existing code checks if `#[macro_export]` is being applied to an item other than a macro, and warns in that case, but fails to take into account macros 2.0/decl macros, despite the attribute having no effect on these macros.

This PR adds a special case for decl macros with the aforementioned attribute, so that the warning is a bit more precise. Instead of just saying "this attribute has no effect", hint towards the fact that decl macros get exported and resolved like regular items.
It also removes a `#[macro_export]` attribute which was applied on one of `core`'s decl macros.

- core: Remove #[macro_export] from `debug_assert_matches`
- check_attrs: Warn when #[macro_export] is used on macros 2.0
2023-08-08 03:30:54 +02:00
..
rustc
rustc_abi
rustc_arena
rustc_ast Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_ast_lowering Consolidate opaque ty and async fn lowering code 2023-08-05 16:53:13 +00:00
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_baked_icu_data
rustc_borrowck Rollup merge of #114477 - estebank:arc-clone, r=compiler-errors 2023-08-04 21:32:00 +02:00
rustc_builtin_macros Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_codegen_cranelift Rollup merge of #114382 - scottmcm:compare-bytes-intrinsic, r=cjgillot 2023-08-07 05:29:12 +02:00
rustc_codegen_gcc Rollup merge of #114382 - scottmcm:compare-bytes-intrinsic, r=cjgillot 2023-08-07 05:29:12 +02:00
rustc_codegen_llvm Update powerpc data layouts 2023-08-07 20:35:55 +02:00
rustc_codegen_ssa Rollup merge of #114376 - inferiorhumanorgans:rustc-codegen-ssa-duplicate-export, r=wesleywiser 2023-08-08 03:30:54 +02:00
rustc_const_eval Rollup merge of #114382 - scottmcm:compare-bytes-intrinsic, r=cjgillot 2023-08-07 05:29:12 +02:00
rustc_data_structures Rollup merge of #114418 - klensy:parking_lot, r=oli-obk 2023-08-04 21:31:56 +02:00
rustc_driver
rustc_driver_impl Auto merge of #114476 - Urgau:missing-dep-file-112898, r=oli-obk 2023-08-06 00:04:52 +00:00
rustc_error_codes Auto merge of #109348 - cjgillot:issue-109146, r=petrochenkov 2023-08-05 11:52:07 +00:00
rustc_error_messages
rustc_errors Auto merge of #114104 - oli-obk:syn2, r=compiler-errors 2023-08-04 18:46:19 +00:00
rustc_expand Auto merge of #114104 - oli-obk:syn2, r=compiler-errors 2023-08-04 18:46:19 +00:00
rustc_feature Rollup merge of #114562 - Trolldemorted:thiscall, r=oli-obk 2023-08-07 16:47:57 +02:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Consolidate opaque ty and async fn lowering code 2023-08-05 16:53:13 +00:00
rustc_hir_analysis Add a new compare_bytes intrinsic instead of calling memcmp directly 2023-08-06 15:47:40 -07:00
rustc_hir_pretty
rustc_hir_typeck Rollup merge of #114461 - sebastiantoh:issue-114423, r=estebank 2023-08-04 21:31:58 +02:00
rustc_incremental
rustc_index
rustc_infer don't replace opaque types under binders with infer vars 2023-08-06 12:08:32 +00:00
rustc_interface Make MissingDoc a module lint. 2023-08-04 16:09:14 +00:00
rustc_lexer
rustc_lint Rollup merge of #114486 - Urgau:const-context-nan-suggestion-114471, r=compiler-errors 2023-08-06 03:56:09 +02:00
rustc_lint_defs
rustc_llvm Fix LLVM version check for ThinLTO import/export lists 2023-08-07 20:36:14 +02:00
rustc_log
rustc_macros
rustc_metadata
rustc_middle Auto merge of #114553 - matthiaskrgr:rollup-5yddunv, r=matthiaskrgr 2023-08-06 19:46:31 +00:00
rustc_mir_build Auto merge of #113902 - Enselic:lint-recursive-drop, r=oli-obk 2023-08-07 13:39:28 +00:00
rustc_mir_dataflow Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung 2023-08-06 17:26:29 +02:00
rustc_mir_transform Auto merge of #113902 - Enselic:lint-recursive-drop, r=oli-obk 2023-08-07 13:39:28 +00:00
rustc_monomorphize
rustc_parse Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_parse_format
rustc_passes check_attrs: Warn when #[macro_export] is used on macros 2.0 2023-08-07 21:14:28 +02:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl
rustc_query_system
rustc_resolve Rollup merge of #114549 - chenyukang:yukang-review-resolve-part, r=petrochenkov 2023-08-07 05:29:13 +02:00
rustc_serialize
rustc_session Auto merge of #114104 - oli-obk:syn2, r=compiler-errors 2023-08-04 18:46:19 +00:00
rustc_smir Add TraitDef::trait_decl method 2023-08-07 10:24:12 -03:00
rustc_span Rollup merge of #114549 - chenyukang:yukang-review-resolve-part, r=petrochenkov 2023-08-07 05:29:13 +02:00
rustc_symbol_mangling
rustc_target Update powerpc data layouts 2023-08-07 20:35:55 +02:00
rustc_trait_selection Rollup merge of #114196 - compiler-errors:bubble-pls, r=lcnr 2023-08-07 16:47:54 +02:00
rustc_traits
rustc_transmute
rustc_ty_utils
rustc_type_ir