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§
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.