pub trait Subdiagnostic {
// Required method
fn add_to_diag(self, diag: &mut Diag<'_>);
}Expand description
Trait implemented by error types. This should not be implemented manually. Instead, use
#[derive(Subdiagnostic)] – see rustc_macros::Subdiagnostic.
Required Methods§
Sourcefn add_to_diag(self, diag: &mut Diag<'_>)
fn add_to_diag(self, diag: &mut Diag<'_>)
Add a subdiagnostic to an existing diagnostic.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".