Trait rustc_middle::ty::error::TypeErrorToStringExt

source ·
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§

source

fn to_string(self, tcx: TyCtxt<'tcx>) -> Cow<'static, str>

Implementors§

source§

impl<'tcx> TypeErrorToStringExt<'tcx> for TypeError<'tcx>