pub struct Diagnostic {
pub code: &'static str,
pub severity: Severity,
pub message: String,
pub span: Span,
pub expected: Vec<String>,
pub help: Option<String>,
pub related: Vec<RelatedInformation>,
}Expand description
A portable compiler diagnostic.
Fields§
§code: &'static strStable diagnostic identifier.
severity: SeverityError or warning severity.
message: StringConcise human-readable description.
span: SpanPrimary source span.
expected: Vec<String>Ordered source values or constructs valid at the primary span.
help: Option<String>Optional corrective guidance.
Other declarations or references involved in the problem.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Diagnostic
impl Debug for Diagnostic
impl Eq for Diagnostic
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more