Skip to main content

FromCycleError

Trait FromCycleError 

Source
pub(crate) trait FromCycleError<'tcx>: Sized {
    // Required method
    fn from_cycle_error(
        tcx: TyCtxt<'tcx>,
        cycle_error: CycleError,
        guar: ErrorGuaranteed,
    ) -> Self;
}

Required Methods§

Source

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, guar: ErrorGuaranteed, ) -> Self

Try to produce a Self value that represents an error form (e.g. TyKind::Error).

Note: the default impl calls raise_fatal, ending compilation immediately! Only a few types override this with a non-fatal impl.

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.

Implementations on Foreign Types§

Source§

impl<'tcx> FromCycleError<'tcx> for &[Variance]

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, _guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx> FromCycleError<'tcx> for Result<EarlyBinder<'_, Ty<'_>>, CyclePlaceholder>

Source§

fn from_cycle_error( _tcx: TyCtxt<'tcx>, _: CycleError, guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx> FromCycleError<'tcx> for Representability

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, _guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx> FromCycleError<'tcx> for Ty<'_>

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, _: CycleError, guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx> FromCycleError<'tcx> for Binder<'_, FnSig<'_>>

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx> FromCycleError<'tcx> for EarlyBinder<'_, Ty<'_>>

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx> FromCycleError<'tcx> for EarlyBinder<'_, Binder<'_, FnSig<'_>>>

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, guar: ErrorGuaranteed, ) -> Self

Source§

impl<'tcx, T> FromCycleError<'tcx> for Result<T, &LayoutError<'_>>

Source§

fn from_cycle_error( tcx: TyCtxt<'tcx>, cycle_error: CycleError, _guar: ErrorGuaranteed, ) -> Self

Implementors§

Source§

impl<'tcx, T> FromCycleError<'tcx> for T