Remove unused Lift
derives.
I found these by commenting out all `Lift` derives and then adding back the ones that were necessary to successfully compile.
This commit is contained in:
parent
6b1980f9cf
commit
af7d3e501b
17 changed files with 49 additions and 51 deletions
|
@ -34,7 +34,7 @@ use std::ops::Index;
|
||||||
/// variables have been rewritten to "canonical vars". These are
|
/// variables have been rewritten to "canonical vars". These are
|
||||||
/// numbered starting from 0 in order of first appearance.
|
/// numbered starting from 0 in order of first appearance.
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
|
||||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct Canonical<'tcx, V> {
|
pub struct Canonical<'tcx, V> {
|
||||||
pub value: V,
|
pub value: V,
|
||||||
pub max_universe: ty::UniverseIndex,
|
pub max_universe: ty::UniverseIndex,
|
||||||
|
@ -72,7 +72,7 @@ impl<'tcx> ty::TypeFoldable<TyCtxt<'tcx>> for CanonicalVarInfos<'tcx> {
|
||||||
/// variables. You will need to supply it later to instantiate the
|
/// variables. You will need to supply it later to instantiate the
|
||||||
/// canonicalized query response.
|
/// canonicalized query response.
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
|
||||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct CanonicalVarValues<'tcx> {
|
pub struct CanonicalVarValues<'tcx> {
|
||||||
pub var_values: ty::GenericArgsRef<'tcx>,
|
pub var_values: ty::GenericArgsRef<'tcx>,
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ pub enum CanonicalTyVarKind {
|
||||||
/// After we execute a query with a canonicalized key, we get back a
|
/// After we execute a query with a canonicalized key, we get back a
|
||||||
/// `Canonical<QueryResponse<..>>`. You can use
|
/// `Canonical<QueryResponse<..>>`. You can use
|
||||||
/// `instantiate_query_result` to access the data in this result.
|
/// `instantiate_query_result` to access the data in this result.
|
||||||
#[derive(Clone, Debug, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct QueryResponse<'tcx, R> {
|
pub struct QueryResponse<'tcx, R> {
|
||||||
pub var_values: CanonicalVarValues<'tcx>,
|
pub var_values: CanonicalVarValues<'tcx>,
|
||||||
pub region_constraints: QueryRegionConstraints<'tcx>,
|
pub region_constraints: QueryRegionConstraints<'tcx>,
|
||||||
|
@ -326,7 +326,7 @@ pub struct QueryResponse<'tcx, R> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
|
||||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct QueryRegionConstraints<'tcx> {
|
pub struct QueryRegionConstraints<'tcx> {
|
||||||
pub outlives: Vec<QueryOutlivesConstraint<'tcx>>,
|
pub outlives: Vec<QueryOutlivesConstraint<'tcx>>,
|
||||||
pub member_constraints: Vec<MemberConstraint<'tcx>>,
|
pub member_constraints: Vec<MemberConstraint<'tcx>>,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use rustc_span::Span;
|
||||||
/// R0 member of [O1..On]
|
/// R0 member of [O1..On]
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct MemberConstraint<'tcx> {
|
pub struct MemberConstraint<'tcx> {
|
||||||
/// The `DefId` and args of the opaque type causing this constraint.
|
/// The `DefId` and args of the opaque type causing this constraint.
|
||||||
/// Used for error reporting.
|
/// Used for error reporting.
|
||||||
|
|
|
@ -162,7 +162,7 @@ pub use self::pointer::{Pointer, PointerArithmetic, Provenance};
|
||||||
/// - A constant
|
/// - A constant
|
||||||
/// - A static
|
/// - A static
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, TyEncodable, TyDecodable)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, TyEncodable, TyDecodable)]
|
||||||
#[derive(HashStable, Lift, TypeFoldable, TypeVisitable)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct GlobalId<'tcx> {
|
pub struct GlobalId<'tcx> {
|
||||||
/// For a constant or static, the `Instance` of the item itself.
|
/// For a constant or static, the `Instance` of the item itself.
|
||||||
/// For a promoted global, the `Instance` of the function they belong to.
|
/// For a promoted global, the `Instance` of the function they belong to.
|
||||||
|
|
|
@ -2295,7 +2295,7 @@ pub struct Constant<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable, Debug)]
|
#[derive(Clone, Copy, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable, Debug)]
|
||||||
#[derive(Lift, TypeFoldable, TypeVisitable)]
|
#[derive(TypeFoldable, TypeVisitable)]
|
||||||
pub enum ConstantKind<'tcx> {
|
pub enum ConstantKind<'tcx> {
|
||||||
/// This constant came from the type system.
|
/// This constant came from the type system.
|
||||||
///
|
///
|
||||||
|
@ -2615,7 +2615,7 @@ impl<'tcx> ConstantKind<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An unevaluated (potentially generic) constant used in MIR.
|
/// An unevaluated (potentially generic) constant used in MIR.
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable, Lift)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable)]
|
||||||
#[derive(Hash, HashStable, TypeFoldable, TypeVisitable)]
|
#[derive(Hash, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct UnevaluatedConst<'tcx> {
|
pub struct UnevaluatedConst<'tcx> {
|
||||||
pub def: DefId,
|
pub def: DefId,
|
||||||
|
|
|
@ -334,7 +334,7 @@ rustc_data_structures::static_assert_size!(ConstraintCategory<'_>, 16);
|
||||||
///
|
///
|
||||||
/// See also `rustc_const_eval::borrow_check::constraints`.
|
/// See also `rustc_const_eval::borrow_check::constraints`.
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Hash)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Hash)]
|
||||||
#[derive(TyEncodable, TyDecodable, HashStable, Lift, TypeVisitable, TypeFoldable)]
|
#[derive(TyEncodable, TyDecodable, HashStable, TypeVisitable, TypeFoldable)]
|
||||||
pub enum ConstraintCategory<'tcx> {
|
pub enum ConstraintCategory<'tcx> {
|
||||||
Return(ReturnConstraint),
|
Return(ReturnConstraint),
|
||||||
Yield,
|
Yield,
|
||||||
|
|
|
@ -86,7 +86,7 @@ pub enum Reveal {
|
||||||
///
|
///
|
||||||
/// We do not want to intern this as there are a lot of obligation causes which
|
/// We do not want to intern this as there are a lot of obligation causes which
|
||||||
/// only live for a short period of time.
|
/// only live for a short period of time.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
|
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable)]
|
#[derive(TypeVisitable, TypeFoldable)]
|
||||||
pub struct ObligationCause<'tcx> {
|
pub struct ObligationCause<'tcx> {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
|
@ -194,7 +194,7 @@ impl<'tcx> ObligationCause<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
|
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable)]
|
#[derive(TypeVisitable, TypeFoldable)]
|
||||||
pub struct UnifyReceiverContext<'tcx> {
|
pub struct UnifyReceiverContext<'tcx> {
|
||||||
pub assoc_item: ty::AssocItem,
|
pub assoc_item: ty::AssocItem,
|
||||||
|
@ -202,7 +202,7 @@ pub struct UnifyReceiverContext<'tcx> {
|
||||||
pub args: GenericArgsRef<'tcx>,
|
pub args: GenericArgsRef<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Lift, Default, HashStable)]
|
#[derive(Clone, PartialEq, Eq, Default, HashStable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable, TyEncodable, TyDecodable)]
|
#[derive(TypeVisitable, TypeFoldable, TyEncodable, TyDecodable)]
|
||||||
pub struct InternedObligationCauseCode<'tcx> {
|
pub struct InternedObligationCauseCode<'tcx> {
|
||||||
/// `None` for `ObligationCauseCode::MiscObligation` (a common case, occurs ~60% of
|
/// `None` for `ObligationCauseCode::MiscObligation` (a common case, occurs ~60% of
|
||||||
|
@ -238,7 +238,7 @@ impl<'tcx> std::ops::Deref for InternedObligationCauseCode<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
|
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable)]
|
#[derive(TypeVisitable, TypeFoldable)]
|
||||||
pub enum ObligationCauseCode<'tcx> {
|
pub enum ObligationCauseCode<'tcx> {
|
||||||
/// Not well classified or should be obvious from the span.
|
/// Not well classified or should be obvious from the span.
|
||||||
|
@ -470,7 +470,7 @@ pub enum WellFormedLoc {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
|
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable)]
|
#[derive(TypeVisitable, TypeFoldable)]
|
||||||
pub struct ImplDerivedObligationCause<'tcx> {
|
pub struct ImplDerivedObligationCause<'tcx> {
|
||||||
pub derived: DerivedObligationCause<'tcx>,
|
pub derived: DerivedObligationCause<'tcx>,
|
||||||
|
@ -531,7 +531,7 @@ impl<'tcx> ty::Lift<'tcx> for StatementAsExpression {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
|
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable)]
|
#[derive(TypeVisitable, TypeFoldable)]
|
||||||
pub struct MatchExpressionArmCause<'tcx> {
|
pub struct MatchExpressionArmCause<'tcx> {
|
||||||
pub arm_block_id: Option<hir::HirId>,
|
pub arm_block_id: Option<hir::HirId>,
|
||||||
|
@ -547,7 +547,7 @@ pub struct MatchExpressionArmCause<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||||
#[derive(Lift, TypeFoldable, TypeVisitable, HashStable, TyEncodable, TyDecodable)]
|
#[derive(TypeFoldable, TypeVisitable, HashStable, TyEncodable, TyDecodable)]
|
||||||
pub struct IfExpressionCause<'tcx> {
|
pub struct IfExpressionCause<'tcx> {
|
||||||
pub then_id: hir::HirId,
|
pub then_id: hir::HirId,
|
||||||
pub else_id: hir::HirId,
|
pub else_id: hir::HirId,
|
||||||
|
@ -557,7 +557,7 @@ pub struct IfExpressionCause<'tcx> {
|
||||||
pub opt_suggest_box_span: Option<Span>,
|
pub opt_suggest_box_span: Option<Span>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
|
#[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeVisitable, TypeFoldable)]
|
#[derive(TypeVisitable, TypeFoldable)]
|
||||||
pub struct DerivedObligationCause<'tcx> {
|
pub struct DerivedObligationCause<'tcx> {
|
||||||
/// The trait predicate of the parent obligation that led to the
|
/// The trait predicate of the parent obligation that led to the
|
||||||
|
@ -570,7 +570,7 @@ pub struct DerivedObligationCause<'tcx> {
|
||||||
pub parent_code: InternedObligationCauseCode<'tcx>,
|
pub parent_code: InternedObligationCauseCode<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, TypeVisitable)]
|
||||||
pub enum SelectionError<'tcx> {
|
pub enum SelectionError<'tcx> {
|
||||||
/// The trait is not implemented.
|
/// The trait is not implemented.
|
||||||
Unimplemented,
|
Unimplemented,
|
||||||
|
@ -593,7 +593,7 @@ pub enum SelectionError<'tcx> {
|
||||||
OpaqueTypeAutoTraitLeakageUnknown(DefId),
|
OpaqueTypeAutoTraitLeakageUnknown(DefId),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, TypeVisitable)]
|
||||||
pub struct SelectionOutputTypeParameterMismatch<'tcx> {
|
pub struct SelectionOutputTypeParameterMismatch<'tcx> {
|
||||||
pub found_trait_ref: ty::PolyTraitRef<'tcx>,
|
pub found_trait_ref: ty::PolyTraitRef<'tcx>,
|
||||||
pub expected_trait_ref: ty::PolyTraitRef<'tcx>,
|
pub expected_trait_ref: ty::PolyTraitRef<'tcx>,
|
||||||
|
@ -638,7 +638,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
|
||||||
/// ### The type parameter `N`
|
/// ### The type parameter `N`
|
||||||
///
|
///
|
||||||
/// See explanation on `ImplSourceUserDefinedData`.
|
/// See explanation on `ImplSourceUserDefinedData`.
|
||||||
#[derive(Clone, PartialEq, Eq, TyEncodable, TyDecodable, HashStable, Lift)]
|
#[derive(Clone, PartialEq, Eq, TyEncodable, TyDecodable, HashStable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
#[derive(TypeFoldable, TypeVisitable)]
|
||||||
pub enum ImplSource<'tcx, N> {
|
pub enum ImplSource<'tcx, N> {
|
||||||
/// ImplSource identifying a particular impl.
|
/// ImplSource identifying a particular impl.
|
||||||
|
@ -704,7 +704,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||||
/// is `Obligation`, as one might expect. During codegen, however, this
|
/// is `Obligation`, as one might expect. During codegen, however, this
|
||||||
/// is `()`, because codegen only requires a shallow resolution of an
|
/// is `()`, because codegen only requires a shallow resolution of an
|
||||||
/// impl, and nested obligations are satisfied later.
|
/// impl, and nested obligations are satisfied later.
|
||||||
#[derive(Clone, PartialEq, Eq, TyEncodable, TyDecodable, HashStable, Lift)]
|
#[derive(Clone, PartialEq, Eq, TyEncodable, TyDecodable, HashStable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
#[derive(TypeFoldable, TypeVisitable)]
|
||||||
pub struct ImplSourceUserDefinedData<'tcx, N> {
|
pub struct ImplSourceUserDefinedData<'tcx, N> {
|
||||||
pub impl_def_id: DefId,
|
pub impl_def_id: DefId,
|
||||||
|
|
|
@ -17,8 +17,7 @@ pub mod type_op {
|
||||||
use crate::ty::{Predicate, Ty, TyCtxt, UserType};
|
use crate::ty::{Predicate, Ty, TyCtxt, UserType};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, Lift)]
|
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
|
||||||
pub struct AscribeUserType<'tcx> {
|
pub struct AscribeUserType<'tcx> {
|
||||||
pub mir_ty: Ty<'tcx>,
|
pub mir_ty: Ty<'tcx>,
|
||||||
pub user_ty: UserType<'tcx>,
|
pub user_ty: UserType<'tcx>,
|
||||||
|
@ -30,22 +29,19 @@ pub mod type_op {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, Lift)]
|
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
|
||||||
pub struct Eq<'tcx> {
|
pub struct Eq<'tcx> {
|
||||||
pub a: Ty<'tcx>,
|
pub a: Ty<'tcx>,
|
||||||
pub b: Ty<'tcx>,
|
pub b: Ty<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, Lift)]
|
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
|
||||||
pub struct Subtype<'tcx> {
|
pub struct Subtype<'tcx> {
|
||||||
pub sub: Ty<'tcx>,
|
pub sub: Ty<'tcx>,
|
||||||
pub sup: Ty<'tcx>,
|
pub sup: Ty<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, Lift)]
|
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
|
||||||
pub struct ProvePredicate<'tcx> {
|
pub struct ProvePredicate<'tcx> {
|
||||||
pub predicate: Predicate<'tcx>,
|
pub predicate: Predicate<'tcx>,
|
||||||
}
|
}
|
||||||
|
@ -56,8 +52,7 @@ pub mod type_op {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, Lift)]
|
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
|
||||||
pub struct Normalize<T> {
|
pub struct Normalize<T> {
|
||||||
pub value: T,
|
pub value: T,
|
||||||
}
|
}
|
||||||
|
@ -101,7 +96,7 @@ impl<'tcx> From<TypeError<'tcx>> for NoSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, Default, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct DropckOutlivesResult<'tcx> {
|
pub struct DropckOutlivesResult<'tcx> {
|
||||||
pub kinds: Vec<GenericArg<'tcx>>,
|
pub kinds: Vec<GenericArg<'tcx>>,
|
||||||
pub overflows: Vec<Ty<'tcx>>,
|
pub overflows: Vec<Ty<'tcx>>,
|
||||||
|
@ -194,7 +189,7 @@ pub struct MethodAutoderefBadTy<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Result from the `normalize_projection_ty` query.
|
/// Result from the `normalize_projection_ty` query.
|
||||||
#[derive(Clone, Debug, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct NormalizationResult<'tcx> {
|
pub struct NormalizationResult<'tcx> {
|
||||||
/// Result of normalization.
|
/// Result of normalization.
|
||||||
pub normalized_ty: Ty<'tcx>,
|
pub normalized_ty: Ty<'tcx>,
|
||||||
|
@ -207,7 +202,7 @@ pub struct NormalizationResult<'tcx> {
|
||||||
/// case they are called implied bounds). They are fed to the
|
/// case they are called implied bounds). They are fed to the
|
||||||
/// `OutlivesEnv` which in turn is supplied to the region checker and
|
/// `OutlivesEnv` which in turn is supplied to the region checker and
|
||||||
/// other parts of the inference system.
|
/// other parts of the inference system.
|
||||||
#[derive(Clone, Debug, TypeFoldable, TypeVisitable, Lift, HashStable)]
|
#[derive(Clone, Debug, TypeFoldable, TypeVisitable, HashStable)]
|
||||||
pub enum OutlivesBound<'tcx> {
|
pub enum OutlivesBound<'tcx> {
|
||||||
RegionSubRegion(ty::Region<'tcx>, ty::Region<'tcx>),
|
RegionSubRegion(ty::Region<'tcx>, ty::Region<'tcx>),
|
||||||
RegionSubParam(ty::Region<'tcx>, ty::ParamTy),
|
RegionSubParam(ty::Region<'tcx>, ty::ParamTy),
|
||||||
|
|
|
@ -76,7 +76,7 @@ pub enum PointerCoercion {
|
||||||
/// At some point, of course, `Box` should move out of the compiler, in which
|
/// At some point, of course, `Box` should move out of the compiler, in which
|
||||||
/// case this is analogous to transforming a struct. E.g., `Box<[i32; 4]>` ->
|
/// case this is analogous to transforming a struct. E.g., `Box<[i32; 4]>` ->
|
||||||
/// `Box<[i32]>` is an `Adjust::Unsize` with the target `Box<[i32]>`.
|
/// `Box<[i32]>` is an `Adjust::Unsize` with the target `Box<[i32]>`.
|
||||||
#[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct Adjustment<'tcx> {
|
pub struct Adjustment<'tcx> {
|
||||||
pub kind: Adjust<'tcx>,
|
pub kind: Adjust<'tcx>,
|
||||||
pub target: Ty<'tcx>,
|
pub target: Ty<'tcx>,
|
||||||
|
@ -88,7 +88,7 @@ impl<'tcx> Adjustment<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub enum Adjust<'tcx> {
|
pub enum Adjust<'tcx> {
|
||||||
/// Go from ! to any type.
|
/// Go from ! to any type.
|
||||||
NeverToAny,
|
NeverToAny,
|
||||||
|
@ -110,7 +110,7 @@ pub enum Adjust<'tcx> {
|
||||||
/// The target type is `U` in both cases, with the region and mutability
|
/// The target type is `U` in both cases, with the region and mutability
|
||||||
/// being those shared by both the receiver and the returned reference.
|
/// being those shared by both the receiver and the returned reference.
|
||||||
#[derive(Copy, Clone, PartialEq, Debug, TyEncodable, TyDecodable, HashStable)]
|
#[derive(Copy, Clone, PartialEq, Debug, TyEncodable, TyDecodable, HashStable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable, Lift)]
|
#[derive(TypeFoldable, TypeVisitable)]
|
||||||
pub struct OverloadedDeref<'tcx> {
|
pub struct OverloadedDeref<'tcx> {
|
||||||
pub region: ty::Region<'tcx>,
|
pub region: ty::Region<'tcx>,
|
||||||
pub mutbl: hir::Mutability,
|
pub mutbl: hir::Mutability,
|
||||||
|
@ -182,7 +182,7 @@ impl From<AutoBorrowMutability> for hir::Mutability {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Debug, TyEncodable, TyDecodable, HashStable)]
|
#[derive(Copy, Clone, PartialEq, Debug, TyEncodable, TyDecodable, HashStable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable, Lift)]
|
#[derive(TypeFoldable, TypeVisitable)]
|
||||||
pub enum AutoBorrow<'tcx> {
|
pub enum AutoBorrow<'tcx> {
|
||||||
/// Converts from T to &T.
|
/// Converts from T to &T.
|
||||||
Ref(ty::Region<'tcx>, AutoBorrowMutability),
|
Ref(ty::Region<'tcx>, AutoBorrowMutability),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use rustc_hir::def_id::DefId;
|
||||||
use rustc_macros::HashStable;
|
use rustc_macros::HashStable;
|
||||||
|
|
||||||
/// An unevaluated (potentially generic) constant used in the type-system.
|
/// An unevaluated (potentially generic) constant used in the type-system.
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable, Lift)]
|
#[derive(Copy, Clone, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable)]
|
||||||
#[derive(Hash, HashStable, TypeFoldable, TypeVisitable)]
|
#[derive(Hash, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct UnevaluatedConst<'tcx> {
|
pub struct UnevaluatedConst<'tcx> {
|
||||||
pub def: DefId,
|
pub def: DefId,
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::collections::hash_map::DefaultHasher;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, TypeFoldable, TypeVisitable)]
|
||||||
pub struct ExpectedFound<T> {
|
pub struct ExpectedFound<T> {
|
||||||
pub expected: T,
|
pub expected: T,
|
||||||
pub found: T,
|
pub found: T,
|
||||||
|
@ -28,7 +28,7 @@ impl<T> ExpectedFound<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data structures used in type unification
|
// Data structures used in type unification
|
||||||
#[derive(Copy, Clone, Debug, TypeVisitable, Lift, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, TypeVisitable, PartialEq, Eq)]
|
||||||
#[rustc_pass_by_value]
|
#[rustc_pass_by_value]
|
||||||
pub enum TypeError<'tcx> {
|
pub enum TypeError<'tcx> {
|
||||||
Mismatch,
|
Mismatch,
|
||||||
|
|
|
@ -1029,7 +1029,7 @@ impl<'a, 'tcx> ArgFolder<'a, 'tcx> {
|
||||||
/// Stores the user-given args to reach some fully qualified path
|
/// Stores the user-given args to reach some fully qualified path
|
||||||
/// (e.g., `<T>::Item` or `<T as Trait>::Item`).
|
/// (e.g., `<T>::Item` or `<T as Trait>::Item`).
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable)]
|
||||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct UserArgs<'tcx> {
|
pub struct UserArgs<'tcx> {
|
||||||
/// The args for the item as given by the user.
|
/// The args for the item as given by the user.
|
||||||
pub args: GenericArgsRef<'tcx>,
|
pub args: GenericArgsRef<'tcx>,
|
||||||
|
@ -1056,7 +1056,7 @@ pub struct UserArgs<'tcx> {
|
||||||
/// the self type, giving `Foo<?A>`. Finally, we unify that with
|
/// the self type, giving `Foo<?A>`. Finally, we unify that with
|
||||||
/// the self type here, which contains `?A` to be `&'static u32`
|
/// the self type here, which contains `?A` to be `&'static u32`
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable)]
|
||||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct UserSelfTy<'tcx> {
|
pub struct UserSelfTy<'tcx> {
|
||||||
pub impl_def_id: DefId,
|
pub impl_def_id: DefId,
|
||||||
pub self_ty: Ty<'tcx>,
|
pub self_ty: Ty<'tcx>,
|
||||||
|
|
|
@ -18,6 +18,9 @@ use std::fmt;
|
||||||
/// Monomorphization happens on-the-fly and no monomorphized MIR is ever created. Instead, this type
|
/// Monomorphization happens on-the-fly and no monomorphized MIR is ever created. Instead, this type
|
||||||
/// simply couples a potentially generic `InstanceDef` with some args, and codegen and const eval
|
/// simply couples a potentially generic `InstanceDef` with some args, and codegen and const eval
|
||||||
/// will do all required substitution as they run.
|
/// will do all required substitution as they run.
|
||||||
|
///
|
||||||
|
/// Note: the `Lift` impl is currently not used by rustc, but is used by
|
||||||
|
/// rustc_codegen_cranelift when the `jit` feature is enabled.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, TyEncodable, TyDecodable)]
|
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, TyEncodable, TyDecodable)]
|
||||||
#[derive(HashStable, Lift, TypeFoldable, TypeVisitable)]
|
#[derive(HashStable, Lift, TypeFoldable, TypeVisitable)]
|
||||||
pub struct Instance<'tcx> {
|
pub struct Instance<'tcx> {
|
||||||
|
|
|
@ -1510,7 +1510,7 @@ impl<'a, 'tcx> IntoIterator for &'a InstantiatedPredicates<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable, TyEncodable, TyDecodable, Lift)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable, TyEncodable, TyDecodable)]
|
||||||
#[derive(TypeFoldable, TypeVisitable)]
|
#[derive(TypeFoldable, TypeVisitable)]
|
||||||
pub struct OpaqueTypeKey<'tcx> {
|
pub struct OpaqueTypeKey<'tcx> {
|
||||||
pub def_id: LocalDefId,
|
pub def_id: LocalDefId,
|
||||||
|
@ -1793,7 +1793,7 @@ impl<'tcx> ParamEnv<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TypeFoldable, TypeVisitable)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TypeFoldable, TypeVisitable)]
|
||||||
#[derive(HashStable, Lift)]
|
#[derive(HashStable)]
|
||||||
pub struct ParamEnvAnd<'tcx, T> {
|
pub struct ParamEnvAnd<'tcx, T> {
|
||||||
pub param_env: ParamEnv<'tcx>,
|
pub param_env: ParamEnv<'tcx>,
|
||||||
pub value: T,
|
pub value: T,
|
||||||
|
|
|
@ -351,7 +351,7 @@ impl<'tcx> ClosureArgs<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Similar to `ClosureArgs`; see the above documentation for more.
|
/// Similar to `ClosureArgs`; see the above documentation for more.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug, TypeFoldable, TypeVisitable)]
|
||||||
pub struct GeneratorArgs<'tcx> {
|
pub struct GeneratorArgs<'tcx> {
|
||||||
pub args: GenericArgsRef<'tcx>,
|
pub args: GenericArgsRef<'tcx>,
|
||||||
}
|
}
|
||||||
|
@ -1305,7 +1305,7 @@ impl<'tcx> AliasTy<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable)]
|
||||||
pub struct GenSig<'tcx> {
|
pub struct GenSig<'tcx> {
|
||||||
pub resume_ty: Ty<'tcx>,
|
pub resume_ty: Ty<'tcx>,
|
||||||
pub yield_ty: Ty<'tcx>,
|
pub yield_ty: Ty<'tcx>,
|
||||||
|
|
|
@ -654,7 +654,7 @@ rustc_index::newtype_index! {
|
||||||
pub type CanonicalUserTypeAnnotations<'tcx> =
|
pub type CanonicalUserTypeAnnotations<'tcx> =
|
||||||
IndexVec<UserTypeAnnotationIndex, CanonicalUserTypeAnnotation<'tcx>>;
|
IndexVec<UserTypeAnnotationIndex, CanonicalUserTypeAnnotation<'tcx>>;
|
||||||
|
|
||||||
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct CanonicalUserTypeAnnotation<'tcx> {
|
pub struct CanonicalUserTypeAnnotation<'tcx> {
|
||||||
pub user_ty: Box<CanonicalUserType<'tcx>>,
|
pub user_ty: Box<CanonicalUserType<'tcx>>,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
|
@ -714,7 +714,7 @@ impl<'tcx> CanonicalUserType<'tcx> {
|
||||||
/// from constants that are named via paths, like `Foo::<A>::new` and
|
/// from constants that are named via paths, like `Foo::<A>::new` and
|
||||||
/// so forth.
|
/// so forth.
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, TyEncodable, TyDecodable)]
|
#[derive(Copy, Clone, Debug, PartialEq, TyEncodable, TyDecodable)]
|
||||||
#[derive(Eq, Hash, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Eq, Hash, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub enum UserType<'tcx> {
|
pub enum UserType<'tcx> {
|
||||||
Ty(Ty<'tcx>),
|
Ty(Ty<'tcx>),
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ use rustc_span::def_id::CRATE_DEF_ID;
|
||||||
use rustc_span::source_map::DUMMY_SP;
|
use rustc_span::source_map::DUMMY_SP;
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Copy, Clone, Debug, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct ImpliedOutlivesBounds<'tcx> {
|
pub struct ImpliedOutlivesBounds<'tcx> {
|
||||||
pub ty: Ty<'tcx>,
|
pub ty: Ty<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ use crate::traits::ObligationCtxt;
|
||||||
use rustc_middle::traits::query::{DropckOutlivesResult, NoSolution};
|
use rustc_middle::traits::query::{DropckOutlivesResult, NoSolution};
|
||||||
use rustc_middle::ty::{ParamEnvAnd, Ty, TyCtxt};
|
use rustc_middle::ty::{ParamEnvAnd, Ty, TyCtxt};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
#[derive(Copy, Clone, Debug, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct DropckOutlives<'tcx> {
|
pub struct DropckOutlives<'tcx> {
|
||||||
dropped_ty: Ty<'tcx>,
|
dropped_ty: Ty<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue