rustc_middle::ty::error

Trait 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>