pub struct DiagnosticNote {
pub span: FileSpan,
pub message: String,
}Expand description
A secondary span attached to a diagnostic, with its own message.
Used for the “related spans when inference connects distant expressions” case in §8.2: a type error’s primary span is the failing expression, and a note can point at where the conflicting type was first inferred.
Fields§
§span: FileSpan§message: StringTrait Implementations§
Source§impl Clone for DiagnosticNote
impl Clone for DiagnosticNote
Source§fn clone(&self) -> DiagnosticNote
fn clone(&self) -> DiagnosticNote
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 moreAuto Trait Implementations§
impl Freeze for DiagnosticNote
impl RefUnwindSafe for DiagnosticNote
impl Send for DiagnosticNote
impl Sync for DiagnosticNote
impl Unpin for DiagnosticNote
impl UnsafeUnpin for DiagnosticNote
impl UnwindSafe for DiagnosticNote
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