Enum clippy_utils::rustc_ty::error::TypeError [−][src]
pub enum TypeError<'tcx> {
Show 29 variants
Mismatch,
ConstnessMismatch(ExpectedFound<BoundConstness>),
PolarityMismatch(ExpectedFound<ImplPolarity>),
UnsafetyMismatch(ExpectedFound<Unsafety>),
AbiMismatch(ExpectedFound<Abi>),
Mutability,
ArgumentMutability(usize),
TupleSize(ExpectedFound<usize>),
FixedArraySize(ExpectedFound<u64>),
ArgCount,
FieldMisMatch(Symbol, Symbol),
RegionsDoesNotOutlive(&'tcx RegionKind, &'tcx RegionKind),
RegionsInsufficientlyPolymorphic(BoundRegionKind, &'tcx RegionKind),
RegionsOverlyPolymorphic(BoundRegionKind, &'tcx RegionKind),
RegionsPlaceholderMismatch,
Sorts(ExpectedFound<&'tcx TyS<'tcx>>),
ArgumentSorts(ExpectedFound<&'tcx TyS<'tcx>>, usize),
IntMismatch(ExpectedFound<IntVarValue>),
FloatMismatch(ExpectedFound<FloatTy>),
Traits(ExpectedFound<DefId>),
VariadicMismatch(ExpectedFound<bool>),
CyclicTy(&'tcx TyS<'tcx>),
CyclicConst(&'tcx Const<'tcx>),
ProjectionMismatched(ExpectedFound<DefId>),
ExistentialMismatch(ExpectedFound<&'tcx List<Binder<'tcx, ExistentialPredicate<'tcx>>>>),
ObjectUnsafeCoercion(DefId),
ConstMismatch(ExpectedFound<&'tcx Const<'tcx>>),
IntrinsicCast,
TargetFeatureCast(DefId),
}Variants
Mismatch
ConstnessMismatch(ExpectedFound<BoundConstness>)
Tuple Fields
PolarityMismatch(ExpectedFound<ImplPolarity>)
Tuple Fields
UnsafetyMismatch(ExpectedFound<Unsafety>)
Tuple Fields
AbiMismatch(ExpectedFound<Abi>)
Tuple Fields
0: ExpectedFound<Abi>Mutability
ArgumentMutability(usize)
Tuple Fields
0: usizeTupleSize(ExpectedFound<usize>)
Tuple Fields
0: ExpectedFound<usize>FixedArraySize(ExpectedFound<u64>)
Tuple Fields
0: ExpectedFound<u64>ArgCount
FieldMisMatch(Symbol, Symbol)
RegionsDoesNotOutlive(&'tcx RegionKind, &'tcx RegionKind)
RegionsInsufficientlyPolymorphic(BoundRegionKind, &'tcx RegionKind)
RegionsOverlyPolymorphic(BoundRegionKind, &'tcx RegionKind)
RegionsPlaceholderMismatch
Sorts(ExpectedFound<&'tcx TyS<'tcx>>)
Tuple Fields
0: ExpectedFound<&'tcx TyS<'tcx>>ArgumentSorts(ExpectedFound<&'tcx TyS<'tcx>>, usize)
IntMismatch(ExpectedFound<IntVarValue>)
Tuple Fields
FloatMismatch(ExpectedFound<FloatTy>)
Tuple Fields
0: ExpectedFound<FloatTy>Traits(ExpectedFound<DefId>)
Tuple Fields
0: ExpectedFound<DefId>VariadicMismatch(ExpectedFound<bool>)
Tuple Fields
0: ExpectedFound<bool>CyclicTy(&'tcx TyS<'tcx>)
Tuple Fields
0: &'tcx TyS<'tcx>Instantiating a type variable with the given type would have created a cycle (because it appears somewhere within that type).
CyclicConst(&'tcx Const<'tcx>)
Tuple Fields
0: &'tcx Const<'tcx>ProjectionMismatched(ExpectedFound<DefId>)
Tuple Fields
0: ExpectedFound<DefId>ExistentialMismatch(ExpectedFound<&'tcx List<Binder<'tcx, ExistentialPredicate<'tcx>>>>)
Tuple Fields
0: ExpectedFound<&'tcx List<Binder<'tcx, ExistentialPredicate<'tcx>>>>ObjectUnsafeCoercion(DefId)
Tuple Fields
0: DefIdConstMismatch(ExpectedFound<&'tcx Const<'tcx>>)
Tuple Fields
0: ExpectedFound<&'tcx Const<'tcx>>IntrinsicCast
TargetFeatureCast(DefId)
Tuple Fields
0: DefIdSafe #[target_feature] functions are not assignable to safe function pointers.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for TypeError<'tcx>
impl<'tcx> !UnwindSafe for TypeError<'tcx>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
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 bytesUnsafetyMismatch: 2 bytesAbiMismatch: 4 bytesMutability: 0 bytesArgumentMutability: 15 bytesTupleSize: 23 bytesFixedArraySize: 23 bytesArgCount: 0 bytesFieldMisMatch: 11 bytesRegionsDoesNotOutlive: 23 bytesRegionsInsufficientlyPolymorphic: 31 bytesRegionsOverlyPolymorphic: 31 bytesRegionsPlaceholderMismatch: 0 bytesSorts: 23 bytesArgumentSorts: 31 bytesIntMismatch: 4 bytesFloatMismatch: 2 bytesTraits: 19 bytesVariadicMismatch: 2 bytesCyclicTy: 15 bytesCyclicConst: 15 bytesProjectionMismatched: 19 bytesExistentialMismatch: 23 bytesObjectUnsafeCoercion: 11 bytesConstMismatch: 23 bytesIntrinsicCast: 0 bytesTargetFeatureCast: 11 bytes