diff options
Diffstat (limited to 'crates/hir_ty/src/types.rs')
-rw-r--r-- | crates/hir_ty/src/types.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir_ty/src/types.rs b/crates/hir_ty/src/types.rs index d4e07a6b8..844e57896 100644 --- a/crates/hir_ty/src/types.rs +++ b/crates/hir_ty/src/types.rs | |||
@@ -11,7 +11,8 @@ use smallvec::SmallVec; | |||
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | AssocTypeId, CanonicalVarKinds, ChalkTraitId, ClosureId, FnDefId, FnSig, ForeignDefId, | 13 | AssocTypeId, CanonicalVarKinds, ChalkTraitId, ClosureId, FnDefId, FnSig, ForeignDefId, |
14 | InferenceVar, Interner, OpaqueTyId, PlaceholderIndex, TypeWalk, VariableKind, VariableKinds, | 14 | InferenceVar, Interner, Lifetime, OpaqueTyId, PlaceholderIndex, TypeWalk, VariableKind, |
15 | VariableKinds, | ||
15 | }; | 16 | }; |
16 | 17 | ||
17 | #[derive(Clone, PartialEq, Eq, Debug, Hash)] | 18 | #[derive(Clone, PartialEq, Eq, Debug, Hash)] |
@@ -39,6 +40,7 @@ impl ProjectionTy { | |||
39 | pub struct DynTy { | 40 | pub struct DynTy { |
40 | /// The unknown self type. | 41 | /// The unknown self type. |
41 | pub bounds: Binders<QuantifiedWhereClauses>, | 42 | pub bounds: Binders<QuantifiedWhereClauses>, |
43 | pub lifetime: Lifetime, | ||
42 | } | 44 | } |
43 | 45 | ||
44 | #[derive(Clone, PartialEq, Eq, Debug, Hash)] | 46 | #[derive(Clone, PartialEq, Eq, Debug, Hash)] |
@@ -122,7 +124,7 @@ pub enum TyKind { | |||
122 | 124 | ||
123 | /// A reference; a pointer with an associated lifetime. Written as | 125 | /// A reference; a pointer with an associated lifetime. Written as |
124 | /// `&'a mut T` or `&'a T`. | 126 | /// `&'a mut T` or `&'a T`. |
125 | Ref(Mutability, Ty), | 127 | Ref(Mutability, Lifetime, Ty), |
126 | 128 | ||
127 | /// This represents a placeholder for an opaque type in situations where we | 129 | /// This represents a placeholder for an opaque type in situations where we |
128 | /// don't know the hidden type (i.e. currently almost always). This is | 130 | /// don't know the hidden type (i.e. currently almost always). This is |