//! What the parser reports beside its best-effort result.
usemf2_model::Span;usecrate::code;/// One resource syntax error.
////// The parser keeps going after every one of them, so a `check` run reports
/// all of a file's errors at once.
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]pubstructDiagnostic{/// The stable detail code: see [`crate::code`].
pubcode:u16,
/// Where, in the file.
pubspan: Span,
}implDiagnostic{/// A diagnostic at `start..end`.
pubfnnew(code:u16, start:u32, end:u32)->Self{
Diagnostic {
code,
span: Span { start, end },}}/// What went wrong, as one sentence without a trailing full stop.
pubfnmessage(&self)->&'staticstr{code::message(self.code)}}