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§
fn impl_similar_to( &self, trait_ref: PolyTraitRef<'tcx>, obligation: &PredicateObligation<'tcx> ) -> Option<(DefId, GenericArgsRef<'tcx>)>
sourcefn describe_enclosure(&self, def_id: LocalDefId) -> Option<&'static str>
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