rustc_
middle
1.83.0
(90b35a623 2024-11-26)
Erase
Type
Required Associated Types
Result
Implementations on Foreign Types
&IndexSlice<I, T>
&T
&[T]
(&T0, &T1)
(&T0, &[T1])
(&T0, Result<(), ErrorGuaranteed>)
()
AllocatorKind
ConstStability
Constness
CoroutineKind
CrateDepKind
CrateNum
CrateType
DefId
DefIndex
DefKey
DefKind
DefPathHash
DefaultBodyStability
Defaultness
Deprecation
EntryFnType
ErrorGuaranteed
ExpnHash
ExpnId
ExternCrate
FiniteBitSet<u32>
HirId
Ident
IsAsync
ItemLocalId
LangItem
Limits
LinkagePreference
LintExpectationId
LocalDefId
LocalModDefId
MaybeOwner<'_>
OptLevel
Option<&T>
Option<&[T]>
Option<(DefId, EntryFnType)>
Option<AllocatorKind>
Option<AsyncDestructor>
Option<ConstStability>
Option<CoroutineKind>
Option<CrateNum>
Option<DefId>
Option<DefKind>
Option<DefaultBodyStability>
Option<DeprecationEntry>
Option<Destructor>
Option<DestructuredConstant<'_>>
Option<EarlyBinder<'_, Ty<'_>>>
Option<FieldIdx>
Option<HirId>
Option<ImplTraitHeader<'_>>
Option<ImplTraitInTraitData>
Option<IntrinsicDef>
Option<LocalDefId>
Option<PanicStrategy>
Option<ScalarInt>
Option<Span>
Option<Stability>
Option<Svh>
Option<usize>
OwnerId
PanicStrategy
Result<&List<Ty<'_>>, AlwaysRequiresDrop>
Result<&T, &FnAbiError<'_>>
Result<&T, CodegenObligationError>
Result<&T, ErrorGuaranteed>
Result<&T, NoSolution>
Result<&[T], ErrorGuaranteed>
Result<&[T], NoSolution>
Result<(&T, ExprId), ErrorGuaranteed>
Result<(), ErrorGuaranteed>
Result<(), NoSolution>
Result<CoerceUnsizedInfo, ErrorGuaranteed>
Result<Const<'_>, LitToConstError>
Result<Const<'_>, LitToConstError>
Result<ConstAlloc<'_>, ErrorHandled>
Result<ConstValue<'_>, ErrorHandled>
Result<EarlyBinder<'_, Ty<'_>>, CyclePlaceholder>
Result<EvaluationResult, OverflowError>
Result<GenericArg<'_>, NoSolution>
Result<Option<EarlyBinder<'_, Const<'_>>>, ErrorGuaranteed>
Result<Option<Instance<'_>>, ErrorGuaranteed>
Result<Result<ValTree<'_>, Ty<'_>>, ErrorHandled>
Result<TyAndLayout<'_, Ty<'_>>, &LayoutError<'_>>
Result<bool, &LayoutError<'_>>
Span
Stability
Svh
Symbol
SymbolManglingVersion
Upvar
bool
u32
usize
Object Safety
Implementors
In rustc_
middle::
query::
erase
rustc_middle
::
query
::
erase
Trait
EraseType
Copy item path
source
pub trait EraseType:
Copy
{ type
Result
:
Copy
; }
Required Associated Types
§
source
type
Result
:
Copy
Object Safety
§
This trait is
not
object safe
.
Implementations on Foreign Types
§
source
§
impl
EraseType
for
AllocatorKind
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
DefKind
source
§
type
Result
= [
u8
;
3
]
source
§
impl
EraseType
for
Constness
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
CoroutineKind
source
§
type
Result
= [
u8
;
2
]
source
§
impl
EraseType
for
Defaultness
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
IsAsync
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
MaybeOwner
<'_>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
LangItem
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
LintExpectationId
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
CrateType
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
EntryFnType
source
§
type
Result
= [
u8
;
2
]
source
§
impl
EraseType
for
OptLevel
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
SymbolManglingVersion
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
CrateDepKind
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
LinkagePreference
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
PanicStrategy
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Option
<(
DefId
,
EntryFnType
)>
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
Option
<
AllocatorKind
>
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Option
<
DefKind
>
source
§
type
Result
= [
u8
;
3
]
source
§
impl
EraseType
for
Option
<
CoroutineKind
>
source
§
type
Result
= [
u8
;
2
]
source
§
impl
EraseType
for
Option
<
PanicStrategy
>
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Option
<
ImplTraitInTraitData
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Option
<
usize
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Option
<
ConstStability
>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Option
<
DefaultBodyStability
>
source
§
type
Result
= [
u8
;
20
]
source
§
impl
EraseType
for
Option
<
Stability
>
source
§
type
Result
= [
u8
;
20
]
source
§
impl
EraseType
for
Option
<
Svh
>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Option
<
HirId
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Option
<
CrateNum
>
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
Option
<
DefId
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Option
<
LocalDefId
>
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
Option
<
Span
>
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
Option
<
FieldIdx
>
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
Option
<
DeprecationEntry
>
source
§
type
Result
= [
u8
;
20
]
source
§
impl
EraseType
for
Option
<
DestructuredConstant
<'_>>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Option
<
ScalarInt
>
source
§
type
Result
= [
u8
;
17
]
source
§
impl
EraseType
for
Option
<
IntrinsicDef
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Option
<
AsyncDestructor
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Option
<
Destructor
>
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
Option
<
ImplTraitHeader
<'_>>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Option
<
EarlyBinder
<'_,
Ty
<'_>>>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Result
<&
List
<
Ty
<'_>>,
AlwaysRequiresDrop
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Result
<
Const
<'_>,
LitToConstError
>
source
§
type
Result
= [
u8
;
40
]
source
§
impl
EraseType
for
Result
<
ConstValue
<'_>,
ErrorHandled
>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Result
<
EvaluationResult
,
OverflowError
>
source
§
type
Result
= [
u8
;
2
]
source
§
impl
EraseType
for
Result
<
Option
<
Instance
<'_>>,
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
32
]
source
§
impl
EraseType
for
Result
<
Option
<
EarlyBinder
<'_,
Const
<'_>>>,
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Result
<
Result
<
ValTree
<'_>,
Ty
<'_>>,
ErrorHandled
>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Result
<
bool
, &
LayoutError
<'_>>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Result
<
()
,
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Result
<
()
,
NoSolution
>
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Result
<
TyAndLayout
<'_,
Ty
<'_>>, &
LayoutError
<'_>>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Result
<
ConstAlloc
<'_>,
ErrorHandled
>
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
Result
<
CoerceUnsizedInfo
,
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
Result
<
Const
<'_>,
LitToConstError
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Result
<
GenericArg
<'_>,
NoSolution
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Result
<
EarlyBinder
<'_,
Ty
<'_>>,
CyclePlaceholder
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
bool
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
u32
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
()
source
§
type
Result
= [
u8
;
0
]
source
§
impl
EraseType
for
usize
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
ConstStability
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
DefaultBodyStability
source
§
type
Result
= [
u8
;
20
]
source
§
impl
EraseType
for
Deprecation
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Stability
source
§
type
Result
= [
u8
;
20
]
source
§
impl
EraseType
for
Svh
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
DefKey
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Upvar
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
HirId
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
ItemLocalId
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
OwnerId
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
FiniteBitSet
<
u32
>
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
ExternCrate
source
§
type
Result
= [
u8
;
32
]
source
§
impl
EraseType
for
Limits
source
§
type
Result
= [
u8
;
24
]
source
§
impl
EraseType
for
CrateNum
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
DefId
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
DefIndex
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
DefPathHash
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
LocalDefId
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
LocalModDefId
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
ExpnHash
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
ExpnId
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
Span
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
ErrorGuaranteed
source
§
type
Result
= [
u8
;
0
]
source
§
impl
EraseType
for
Ident
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
Symbol
source
§
type
Result
= [
u8
;
4
]
source
§
impl<I:
Idx
, T>
EraseType
for &
IndexSlice
<I, T>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T0>
EraseType
for (
&T0
,
Result
<
()
,
ErrorGuaranteed
>)
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T0, T1>
EraseType
for (
&T0
, &
[T1]
)
source
§
type
Result
= [
u8
;
24
]
source
§
impl<T0, T1>
EraseType
for (
&T0
,
&T1
)
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for &
[T]
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Option
<&
[T]
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Option
<
&T
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<T>
EraseType
for
Result
<&
[T]
,
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Result
<&
[T]
,
NoSolution
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Result
<(
&T
,
ExprId
),
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Result
<
&T
, &
FnAbiError
<'_>>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Result
<
&T
,
CodegenObligationError
>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for
Result
<
&T
,
ErrorGuaranteed
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<T>
EraseType
for
Result
<
&T
,
NoSolution
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<T>
EraseType
for
&T
source
§
type
Result
= [
u8
;
8
]
Implementors
§
source
§
impl
EraseType
for
Linkage
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
ObjectLifetimeDefault
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
ResolvedArg
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
LitToConstError
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
ErrorHandled
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
CodegenObligationError
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
WellFormedLoc
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
EvaluationResult
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
OverflowError
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Representability
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
AssocItemContainer
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Asyncness
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
ImplPolarity
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Variance
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
Visibility
<
DefId
>
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
BoundVariableKind
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
SymbolExportInfo
source
§
type
Result
= [
u8
;
3
]
source
§
impl
EraseType
for
DeprecationEntry
source
§
type
Result
= [
u8
;
20
]
source
§
impl
EraseType
for
CtfeProvenance
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
AllocId
source
§
type
Result
= [
u8
;
8
]
source
§
impl
EraseType
for
ConstQualifs
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
ExprId
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
CoerceUnsizedInfo
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
AssocItem
source
§
type
Result
= [
u8
;
40
]
source
§
impl
EraseType
for
DeducedParamAttrs
source
§
type
Result
= [
u8
;
1
]
source
§
impl
EraseType
for
UnusedGenericParams
source
§
type
Result
= [
u8
;
4
]
source
§
impl
EraseType
for
NoSolution
source
§
type
Result
= [
u8
;
0
]
source
§
impl
EraseType
for
AsyncDestructor
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Destructor
source
§
type
Result
= [
u8
;
12
]
source
§
impl
EraseType
for
ReprOptions
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
AlwaysRequiresDrop
source
§
type
Result
= [
u8
;
0
]
source
§
impl
EraseType
for
SimplifiedType
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Binder
<'_, &
List
<
Ty
<'_>>>
source
§
type
Result
= [
u8
;
16
]
source
§
impl
EraseType
for
Binder
<'_,
FnSig
<'_>>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
ExportedSymbol
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for rustc_middle::mir::consts::
Const
<'tcx>
source
§
type
Result
= [
u8
;
40
]
source
§
impl<'tcx>
EraseType
for
ConstValue
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
ValTree
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
InhabitedPredicate
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
InstanceKind
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
FnAbiError
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
LayoutError
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
VtblEntry
<'tcx>
source
§
type
Result
= [
u8
;
32
]
source
§
impl<'tcx>
EraseType
for
ConstAlloc
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
GlobalId
<'tcx>
source
§
type
Result
= [
u8
;
40
]
source
§
impl<'tcx>
EraseType
for
LitToConstInput
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
DestructuredConstant
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
MethodAutoderefStepsResult
<'tcx>
source
§
type
Result
= [
u8
;
32
]
source
§
impl<'tcx>
EraseType
for
AscribeUserType
<'tcx>
source
§
type
Result
= [
u8
;
40
]
source
§
impl<'tcx>
EraseType
for
Eq
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
ProvePredicate
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
Subtype
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
AdtDef
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
ClosureTypeInfo
<'tcx>
source
§
type
Result
= [
u8
;
64
]
source
§
impl<'tcx>
EraseType
for rustc_middle::ty::consts::
Const
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
GenericArg
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
GenericPredicates
<'tcx>
source
§
type
Result
= [
u8
;
32
]
source
§
impl<'tcx>
EraseType
for
Instance
<'tcx>
source
§
type
Result
= [
u8
;
32
]
source
§
impl<'tcx>
EraseType
for
Predicate
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
DestructuredConst
<'tcx>
source
§
type
Result
= [
u8
;
24
]
source
§
impl<'tcx>
EraseType
for
ParamEnv
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
SymbolName
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
Ty
<'tcx>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<'tcx>
EraseType
for
EvalStaticInitializerRawResult
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
UnevaluatedConst
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
ClauseKind
<'tcx>
source
§
type
Result
= [
u8
;
32
]
source
§
impl<'tcx>
EraseType
for
ExistentialTraitRef
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
TraitRef
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
AliasTy
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<'tcx>
EraseType
for
FnSig
<'tcx>
source
§
type
Result
= [
u8
;
16
]
source
§
impl<T>
EraseType
for &
List
<T>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<T>
EraseType
for &
ListWithCachedTypeInfo
<T>
source
§
type
Result
= [
u8
;
8
]
source
§
impl<T:
EraseType
>
EraseType
for
EarlyBinder
<'_, T>
source
§
type
Result
= <T as
EraseType
>::
Result