macro_rules! warning {
(
$span:expr,
$fmt:literal $(, $arg:expr)*
$(; hint: $hint:literal $(, $hint_arg:expr)*)*
$(,)?
) => { ... };
}
Expand description
Construct a SourceDiagnostic
with severity Warning
.
You can also emit hints with the ; hint: "..."
syntax.
ⓘ
warning!(span, "warning with a {}", "source result");
warning!(
span, "warning with a {}", "source result";
hint: "hint 1"
);
warning!(
span, "warning with a {}", "source result";
hint: "hint 1";
hint: "hint 2";
);