macro_rules! trace {
($($args:tt)+) => { ... };
}Expand description
Emit a note of kind NoteKind::Trace with a formatted message.
Trace notes are meant to provide information about the execution history that led to the
emission of the previous diagnostic. This is usally done by matching on a Result and emit the
trace note in the Err case.
Example:
match parse_int(s) {
Ok(value) => Ok(something(value)),
Err(_) => {
trace!(span, "while parsing a message");
Err(DiagnosticEmitted)
}
}