@@ -4,18 +4,8 @@ use crate::ty::Ty;
4
4
use rustc_hir:: HirId ;
5
5
use rustc_target:: abi:: VariantIdx ;
6
6
7
- #[ derive(
8
- Clone ,
9
- Copy ,
10
- Debug ,
11
- PartialEq ,
12
- Eq ,
13
- Hash ,
14
- TyEncodable ,
15
- TyDecodable ,
16
- TypeFoldable ,
17
- HashStable
18
- ) ]
7
+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable ) ]
8
+ #[ derive( TypeFoldable , TypeVisitable ) ]
19
9
pub enum PlaceBase {
20
10
/// A temporary variable.
21
11
Rvalue ,
@@ -27,18 +17,8 @@ pub enum PlaceBase {
27
17
Upvar ( ty:: UpvarId ) ,
28
18
}
29
19
30
- #[ derive(
31
- Clone ,
32
- Copy ,
33
- Debug ,
34
- PartialEq ,
35
- Eq ,
36
- Hash ,
37
- TyEncodable ,
38
- TyDecodable ,
39
- TypeFoldable ,
40
- HashStable
41
- ) ]
20
+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable ) ]
21
+ #[ derive( TypeFoldable , TypeVisitable ) ]
42
22
pub enum ProjectionKind {
43
23
/// A dereference of a pointer, reference or `Box<T>` of the given type.
44
24
Deref ,
@@ -58,18 +38,8 @@ pub enum ProjectionKind {
58
38
Subslice ,
59
39
}
60
40
61
- #[ derive(
62
- Clone ,
63
- Copy ,
64
- Debug ,
65
- PartialEq ,
66
- Eq ,
67
- Hash ,
68
- TyEncodable ,
69
- TyDecodable ,
70
- TypeFoldable ,
71
- HashStable
72
- ) ]
41
+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable ) ]
42
+ #[ derive( TypeFoldable , TypeVisitable ) ]
73
43
pub struct Projection < ' tcx > {
74
44
/// Type after the projection is applied.
75
45
pub ty : Ty < ' tcx > ,
@@ -81,7 +51,8 @@ pub struct Projection<'tcx> {
81
51
/// A `Place` represents how a value is located in memory.
82
52
///
83
53
/// This is an HIR version of [`rustc_middle::mir::Place`].
84
- #[ derive( Clone , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , TypeFoldable , HashStable ) ]
54
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable ) ]
55
+ #[ derive( TypeFoldable , TypeVisitable ) ]
85
56
pub struct Place < ' tcx > {
86
57
/// The type of the `PlaceBase`
87
58
pub base_ty : Ty < ' tcx > ,
@@ -94,7 +65,8 @@ pub struct Place<'tcx> {
94
65
/// A `PlaceWithHirId` represents how a value is located in memory.
95
66
///
96
67
/// This is an HIR version of [`rustc_middle::mir::Place`].
97
- #[ derive( Clone , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , TypeFoldable , HashStable ) ]
68
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable ) ]
69
+ #[ derive( TypeFoldable , TypeVisitable ) ]
98
70
pub struct PlaceWithHirId < ' tcx > {
99
71
/// `HirId` of the expression or pattern producing this value.
100
72
pub hir_id : HirId ,
0 commit comments