pub trait TypeErrorToStringExt<'tcx> {
// Required method
fn to_string(self, tcx: TyCtxt<'tcx>) -> Cow<'static, str>;
}Expand description
Explains the source of a type err in a short, human readable way.
This is meant to be placed in parentheses after some larger message.
You should also invoke note_and_explain_type_err() afterwards
to present additional details, particularly when it comes to lifetime-
related errors.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".