pub type TypeError<'tcx> = TypeError<TyCtxt<'tcx>>;
Aliased Type§
pub enum TypeError<'tcx> {
Show 24 variants
Mismatch,
PolarityMismatch(ExpectedFound<PredicatePolarity>),
SafetyMismatch(ExpectedFound<Safety>),
AbiMismatch(ExpectedFound<ExternAbi>),
Mutability,
ArgumentMutability(usize),
TupleSize(ExpectedFound<usize>),
ArraySize(ExpectedFound<Const<'tcx>>),
ArgCount,
RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>),
RegionsInsufficientlyPolymorphic(BoundRegion, Region<'tcx>),
RegionsPlaceholderMismatch,
Sorts(ExpectedFound<Ty<'tcx>>),
ArgumentSorts(ExpectedFound<Ty<'tcx>>, usize),
Traits(ExpectedFound<DefId>),
VariadicMismatch(ExpectedFound<bool>),
CyclicTy(Ty<'tcx>),
CyclicConst(Const<'tcx>),
ProjectionMismatched(ExpectedFound<DefId>),
ExistentialMismatch(ExpectedFound<&'tcx RawList<(), Binder<TyCtxt<'tcx>, ExistentialPredicate<TyCtxt<'tcx>>>>>),
ConstMismatch(ExpectedFound<Const<'tcx>>),
IntrinsicCast,
ForceInlineCast,
TargetFeatureCast(DefId),
}
Variants§
Mismatch
PolarityMismatch(ExpectedFound<PredicatePolarity>)
SafetyMismatch(ExpectedFound<Safety>)
AbiMismatch(ExpectedFound<ExternAbi>)
Mutability
ArgumentMutability(usize)
TupleSize(ExpectedFound<usize>)
ArraySize(ExpectedFound<Const<'tcx>>)
ArgCount
RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>)
RegionsInsufficientlyPolymorphic(BoundRegion, Region<'tcx>)
RegionsPlaceholderMismatch
Sorts(ExpectedFound<Ty<'tcx>>)
ArgumentSorts(ExpectedFound<Ty<'tcx>>, usize)
Traits(ExpectedFound<DefId>)
VariadicMismatch(ExpectedFound<bool>)
CyclicTy(Ty<'tcx>)
Instantiating a type variable with the given type would have created a cycle (because it appears somewhere within that type).
CyclicConst(Const<'tcx>)
ProjectionMismatched(ExpectedFound<DefId>)
ExistentialMismatch(ExpectedFound<&'tcx RawList<(), Binder<TyCtxt<'tcx>, ExistentialPredicate<TyCtxt<'tcx>>>>>)
ConstMismatch(ExpectedFound<Const<'tcx>>)
IntrinsicCast
ForceInlineCast
#[rustc_force_inline]
functions must be inlined and must not be codegened independently,
so casting to a function pointer must be prohibited.
TargetFeatureCast(DefId)
Safe #[target_feature]
functions are not assignable to safe function pointers.
Trait Implementations§
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.