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
Showing
想要评论请 注册 或 登录