Add #[derive(TypeVisitable)]
This commit is contained in:
@@ -34,7 +34,7 @@ use std::ops::Index;
|
||||
/// variables have been rewritten to "canonical vars". These are
|
||||
/// numbered starting from 0 in order of first appearance.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
|
||||
#[derive(HashStable, TypeFoldable, Lift)]
|
||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
||||
pub struct Canonical<'tcx, V> {
|
||||
pub max_universe: ty::UniverseIndex,
|
||||
pub variables: CanonicalVarInfos<'tcx>,
|
||||
@@ -53,7 +53,7 @@ pub type CanonicalVarInfos<'tcx> = &'tcx List<CanonicalVarInfo<'tcx>>;
|
||||
/// variables. You will need to supply it later to instantiate the
|
||||
/// canonicalized query response.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
|
||||
#[derive(HashStable, TypeFoldable, Lift)]
|
||||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
||||
pub struct CanonicalVarValues<'tcx> {
|
||||
pub var_values: IndexVec<BoundVar, GenericArg<'tcx>>,
|
||||
}
|
||||
@@ -173,7 +173,7 @@ pub enum CanonicalTyVarKind {
|
||||
/// After we execute a query with a canonicalized key, we get back a
|
||||
/// `Canonical<QueryResponse<..>>`. You can use
|
||||
/// `instantiate_query_result` to access the data in this result.
|
||||
#[derive(Clone, Debug, HashStable, TypeFoldable, Lift)]
|
||||
#[derive(Clone, Debug, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
||||
pub struct QueryResponse<'tcx, R> {
|
||||
pub var_values: CanonicalVarValues<'tcx>,
|
||||
pub region_constraints: QueryRegionConstraints<'tcx>,
|
||||
@@ -187,7 +187,7 @@ pub struct QueryResponse<'tcx, R> {
|
||||
pub value: R,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, HashStable, TypeFoldable, Lift)]
|
||||
#[derive(Clone, Debug, Default, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
||||
pub struct QueryRegionConstraints<'tcx> {
|
||||
pub outlives: Vec<QueryOutlivesConstraint<'tcx>>,
|
||||
pub member_constraints: Vec<MemberConstraint<'tcx>>,
|
||||
|
||||
@@ -13,7 +13,7 @@ use rustc_span::Span;
|
||||
/// ```text
|
||||
/// R0 member of [O1..On]
|
||||
/// ```
|
||||
#[derive(Debug, Clone, HashStable, TypeFoldable, Lift)]
|
||||
#[derive(Debug, Clone, HashStable, TypeFoldable, TypeVisitable, Lift)]
|
||||
pub struct MemberConstraint<'tcx> {
|
||||
/// The `DefId` of the opaque type causing this constraint: used for error reporting.
|
||||
pub opaque_type_def_id: DefId,
|
||||
|
||||
Reference in New Issue
Block a user