pub trait DiagnosticEntry: Clone + Debug + Eq + Hash {
type DbType: Upcast<dyn FilesGroup> + ?Sized;
// Required methods
fn format(&self, db: &Self::DbType) -> String;
fn location(&self, db: &Self::DbType) -> DiagnosticLocation;
// Provided method
fn notes(&self, _db: &Self::DbType) -> &[DiagnosticNote] { ... }
}
Expand description
A trait for diagnostics (i.e., errors and warnings) across the compiler. Meant to be implemented by each module that may produce diagnostics.
Required Associated Types§
type DbType: Upcast<dyn FilesGroup> + ?Sized
Required Methods§
fn format(&self, db: &Self::DbType) -> String
fn location(&self, db: &Self::DbType) -> DiagnosticLocation
Provided Methods§
fn notes(&self, _db: &Self::DbType) -> &[DiagnosticNote]
Object Safety§
This trait is not object safe.