pub trait TypeErrCtxtExt<'tcx> {
    // Required methods
    fn impl_similar_to(
        &self,
        trait_ref: PolyTraitRef<'tcx>,
        obligation: &PredicateObligation<'tcx>
    ) -> Option<(DefId, GenericArgsRef<'tcx>)>;
    fn describe_enclosure(&self, def_id: LocalDefId) -> Option<&'static str>;
    fn on_unimplemented_note(
        &self,
        trait_ref: PolyTraitRef<'tcx>,
        obligation: &PredicateObligation<'tcx>,
        long_ty_file: &mut Option<PathBuf>
    ) -> OnUnimplementedNote;
}

Required Methods§

source

fn impl_similar_to( &self, trait_ref: PolyTraitRef<'tcx>, obligation: &PredicateObligation<'tcx> ) -> Option<(DefId, GenericArgsRef<'tcx>)>

source

fn describe_enclosure(&self, def_id: LocalDefId) -> Option<&'static str>

Used to set on_unimplemented’s ItemContext to be the enclosing (async) block/function/closure

source

fn on_unimplemented_note( &self, trait_ref: PolyTraitRef<'tcx>, obligation: &PredicateObligation<'tcx>, long_ty_file: &mut Option<PathBuf> ) -> OnUnimplementedNote

Implementors§

source§

impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx>