@@ -40,7 +40,7 @@ pub struct Canonical<'tcx, V> {
4040 pub value : V ,
4141}
4242
43- pub type CanonicalVarInfos < ' tcx > = & ' tcx List < CanonicalVarInfo > ;
43+ pub type CanonicalVarInfos < ' tcx > = & ' tcx List < CanonicalVarInfo < ' tcx > > ;
4444
4545/// A set of values corresponding to the canonical variables from some
4646/// `Canonical`. You can give these values to
@@ -88,11 +88,11 @@ impl Default for OriginalQueryValues<'tcx> {
8888/// a copy of the canonical value in some other inference context,
8989/// with fresh inference variables replacing the canonical values.
9090#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , TyDecodable , TyEncodable , HashStable ) ]
91- pub struct CanonicalVarInfo {
92- pub kind : CanonicalVarKind ,
91+ pub struct CanonicalVarInfo < ' tcx > {
92+ pub kind : CanonicalVarKind < ' tcx > ,
9393}
9494
95- impl CanonicalVarInfo {
95+ impl < ' tcx > CanonicalVarInfo < ' tcx > {
9696 pub fn universe ( & self ) -> ty:: UniverseIndex {
9797 self . kind . universe ( )
9898 }
@@ -113,7 +113,7 @@ impl CanonicalVarInfo {
113113/// in the type-theory sense of the term -- i.e., a "meta" type system
114114/// that analyzes type-like values.
115115#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , TyDecodable , TyEncodable , HashStable ) ]
116- pub enum CanonicalVarKind {
116+ pub enum CanonicalVarKind < ' tcx > {
117117 /// Some kind of type inference variable.
118118 Ty ( CanonicalTyVarKind ) ,
119119
@@ -132,10 +132,10 @@ pub enum CanonicalVarKind {
132132 Const ( ty:: UniverseIndex ) ,
133133
134134 /// A "placeholder" that represents "any const".
135- PlaceholderConst ( ty:: PlaceholderConst ) ,
135+ PlaceholderConst ( ty:: PlaceholderConst < ' tcx > ) ,
136136}
137137
138- impl CanonicalVarKind {
138+ impl < ' tcx > CanonicalVarKind < ' tcx > {
139139 pub fn universe ( self ) -> ty:: UniverseIndex {
140140 match self {
141141 CanonicalVarKind :: Ty ( kind) => match kind {
@@ -287,9 +287,11 @@ pub type QueryOutlivesConstraint<'tcx> =
287287 ty:: Binder < ty:: OutlivesPredicate < GenericArg < ' tcx > , Region < ' tcx > > > ;
288288
289289CloneTypeFoldableAndLiftImpls ! {
290- crate :: infer:: canonical:: Certainty ,
291- crate :: infer:: canonical:: CanonicalVarInfo ,
292- crate :: infer:: canonical:: CanonicalVarKind ,
290+ for <' tcx> {
291+ crate :: infer:: canonical:: Certainty ,
292+ crate :: infer:: canonical:: CanonicalVarInfo <' tcx>,
293+ crate :: infer:: canonical:: CanonicalVarKind <' tcx>,
294+ }
293295}
294296
295297CloneTypeFoldableImpls ! {
0 commit comments