pub trait TypeInformationCtxt<'tcx> {
    type TypeckResults<'a>: Deref<Target = TypeckResults<'tcx>>
       where Self: 'a;
    type Error;

    // Required methods
    fn typeck_results(&self) -> Self::TypeckResults<'_>;
    fn resolve_vars_if_possible<T: TypeFoldable<TyCtxt<'tcx>>>(&self, t: T) -> T;
    fn try_structurally_resolve_type(
        &self,
        span: Span,
        ty: Ty<'tcx>,
    ) -> Ty<'tcx>;
    fn report_error(&self, span: Span, msg: impl ToString) -> Self::Error;
    fn error_reported_in_ty(&self, ty: Ty<'tcx>) -> Result<(), Self::Error>;
    fn tainted_by_errors(&self) -> Result<(), Self::Error>;
    fn type_is_copy_modulo_regions(&self, ty: Ty<'tcx>) -> bool;
    fn body_owner_def_id(&self) -> LocalDefId;
    fn tcx(&self) -> TyCtxt<'tcx>;
}

Required Associated Types§

source

type TypeckResults<'a>: Deref<Target = TypeckResults<'tcx>> where Self: 'a

source

type Error

Required Methods§

source

fn typeck_results(&self) -> Self::TypeckResults<'_>

source

fn resolve_vars_if_possible<T: TypeFoldable<TyCtxt<'tcx>>>(&self, t: T) -> T

source

fn try_structurally_resolve_type(&self, span: Span, ty: Ty<'tcx>) -> Ty<'tcx>

source

fn report_error(&self, span: Span, msg: impl ToString) -> Self::Error

source

fn error_reported_in_ty(&self, ty: Ty<'tcx>) -> Result<(), Self::Error>

source

fn tainted_by_errors(&self) -> Result<(), Self::Error>

source

fn type_is_copy_modulo_regions(&self, ty: Ty<'tcx>) -> bool

source

fn body_owner_def_id(&self) -> LocalDefId

source

fn tcx(&self) -> TyCtxt<'tcx>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'tcx> TypeInformationCtxt<'tcx> for (&LateContext<'tcx>, LocalDefId)

§

type TypeckResults<'a> = &'tcx TypeckResults<'tcx> where Self: 'a

§

type Error = !

source§

fn typeck_results(&self) -> Self::TypeckResults<'_>

source§

fn try_structurally_resolve_type(&self, _span: Span, ty: Ty<'tcx>) -> Ty<'tcx>

source§

fn resolve_vars_if_possible<T: TypeFoldable<TyCtxt<'tcx>>>(&self, t: T) -> T

source§

fn report_error(&self, span: Span, msg: impl ToString) -> !

source§

fn error_reported_in_ty(&self, _ty: Ty<'tcx>) -> Result<(), !>

source§

fn tainted_by_errors(&self) -> Result<(), !>

source§

fn type_is_copy_modulo_regions(&self, ty: Ty<'tcx>) -> bool

source§

fn body_owner_def_id(&self) -> LocalDefId

source§

fn tcx(&self) -> TyCtxt<'tcx>

Implementors§

source§

impl<'tcx> TypeInformationCtxt<'tcx> for &FnCtxt<'_, 'tcx>

§

type TypeckResults<'a> = Ref<'a, TypeckResults<'tcx>> where Self: 'a

§

type Error = ErrorGuaranteed