pub type TypeError<'tcx> = TypeError<TyCtxt<'tcx>>;
Aliased Type§
enum TypeError<'tcx> {
Show 24 variants
Mismatch,
ConstnessMismatch(ExpectedFound<BoundConstness>),
PolarityMismatch(ExpectedFound<PredicatePolarity>),
SafetyMismatch(ExpectedFound<Safety>),
AbiMismatch(ExpectedFound<Abi>),
Mutability,
ArgumentMutability(usize),
TupleSize(ExpectedFound<usize>),
FixedArraySize(ExpectedFound<u64>),
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,
TargetFeatureCast(DefId),
}
Variants§
Mismatch
ConstnessMismatch(ExpectedFound<BoundConstness>)
PolarityMismatch(ExpectedFound<PredicatePolarity>)
SafetyMismatch(ExpectedFound<Safety>)
AbiMismatch(ExpectedFound<Abi>)
Mutability
ArgumentMutability(usize)
TupleSize(ExpectedFound<usize>)
FixedArraySize(ExpectedFound<u64>)
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
TargetFeatureCast(DefId)
Safe #[target_feature]
functions are not assignable to safe function pointers.
Trait Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Mismatch
: 0 bytesConstnessMismatch
: 2 bytesPolarityMismatch
: 2 bytesSafetyMismatch
: 2 bytesAbiMismatch
: 4 bytesMutability
: 0 bytesArgumentMutability
: 15 bytesTupleSize
: 23 bytesFixedArraySize
: 23 bytesArgCount
: 0 bytesRegionsDoesNotOutlive
: 23 bytesRegionsInsufficientlyPolymorphic
: 31 bytesRegionsPlaceholderMismatch
: 0 bytesSorts
: 23 bytesArgumentSorts
: 31 bytesTraits
: 19 bytesVariadicMismatch
: 2 bytesCyclicTy
: 15 bytesCyclicConst
: 15 bytesProjectionMismatched
: 19 bytesExistentialMismatch
: 23 bytesConstMismatch
: 23 bytesIntrinsicCast
: 0 bytesTargetFeatureCast
: 11 bytes