1
Fork 0

Adjust #[macro_export]/doctest help suggestion for non_local_defs lint

This commit is contained in:
Urgau 2024-04-30 22:40:19 +02:00
parent e27af2917b
commit 712560cd03
6 changed files with 49 additions and 4 deletions

View file

@ -456,6 +456,8 @@ lint_non_local_definitions_macro_rules = non-local `macro_rules!` definition, th
[one] `{$body_name}`
*[other] `{$body_name}` and up {$depth} bodies
}
.help_doctest =
remove the `#[macro_export]` or make this doc-test a standalone test with its own `fn main() {"{"} ... {"}"}`
.non_local = a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
.exception = one exception to the rule are anon-const (`const _: () = {"{"} ... {"}"}`) at top-level module