Unify syntax (all to @eval_always)

This commit is contained in:
blyxyas 2024-10-11 00:31:17 +02:00
parent 637d5cc56f
commit 8a40884e1c
2 changed files with 4 additions and 4 deletions

View File

@ -430,7 +430,7 @@ declare_tool_lint! {
Deny, Deny,
"prevent creation of diagnostics which cannot be translated", "prevent creation of diagnostics which cannot be translated",
report_in_external_macro: true, report_in_external_macro: true,
eval_always: true @eval_always = true
} }
declare_tool_lint! { declare_tool_lint! {
@ -444,7 +444,7 @@ declare_tool_lint! {
Deny, Deny,
"prevent diagnostic creation outside of `Diagnostic`/`Subdiagnostic`/`LintDiagnostic` impls", "prevent diagnostic creation outside of `Diagnostic`/`Subdiagnostic`/`LintDiagnostic` impls",
report_in_external_macro: true, report_in_external_macro: true,
eval_always: true @eval_always = true
} }
declare_lint_pass!(Diagnostics => [UNTRANSLATABLE_DIAGNOSTIC, DIAGNOSTIC_OUTSIDE_OF_IMPL]); declare_lint_pass!(Diagnostics => [UNTRANSLATABLE_DIAGNOSTIC, DIAGNOSTIC_OUTSIDE_OF_IMPL]);

View File

@ -910,14 +910,14 @@ macro_rules! declare_tool_lint {
$(#[$attr:meta])* $vis:vis $tool:ident ::$NAME:ident, $Level:ident, $desc:expr, $(#[$attr:meta])* $vis:vis $tool:ident ::$NAME:ident, $Level:ident, $desc:expr,
report_in_external_macro: $rep:expr report_in_external_macro: $rep:expr
$(, @feature_gate = $gate:ident;)? $(, @feature_gate = $gate:ident;)?
$(, eval_always: $eval_always: literal)? $(, @eval_always = $eval_always: literal)?
) => ( ) => (
$crate::declare_tool_lint!{$(#[$attr])* $vis $tool::$NAME, $Level, $desc, $rep $(, @feature_gate = $gate;)?} $crate::declare_tool_lint!{$(#[$attr])* $vis $tool::$NAME, $Level, $desc, $rep $(, @feature_gate = $gate;)?}
); );
( (
$(#[$attr:meta])* $vis:vis $tool:ident ::$NAME:ident, $Level:ident, $desc:expr, $(#[$attr:meta])* $vis:vis $tool:ident ::$NAME:ident, $Level:ident, $desc:expr,
$external:expr $external:expr
$(, @eval_always: $eval_always: literal)? $(, @eval_always = $eval_always: literal)?
$(, @feature_gate = $gate:ident;)? $(, @feature_gate = $gate:ident;)?
) => ( ) => (
$(#[$attr])* $(#[$attr])*