@@ -4,18 +4,8 @@ use crate::ty::Ty;
44use rustc_hir:: HirId ;
55use rustc_target:: abi:: VariantIdx ;
66
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 ) ]
199pub enum PlaceBase {
2010 /// A temporary variable.
2111 Rvalue ,
@@ -27,18 +17,8 @@ pub enum PlaceBase {
2717 Upvar ( ty:: UpvarId ) ,
2818}
2919
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 ) ]
4222pub enum ProjectionKind {
4323 /// A dereference of a pointer, reference or `Box<T>` of the given type.
4424 Deref ,
@@ -58,18 +38,8 @@ pub enum ProjectionKind {
5838 Subslice ,
5939}
6040
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 ) ]
7343pub struct Projection < ' tcx > {
7444 /// Type after the projection is applied.
7545 pub ty : Ty < ' tcx > ,
@@ -81,7 +51,8 @@ pub struct Projection<'tcx> {
8151/// A `Place` represents how a value is located in memory.
8252///
8353/// 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 ) ]
8556pub struct Place < ' tcx > {
8657 /// The type of the `PlaceBase`
8758 pub base_ty : Ty < ' tcx > ,
@@ -94,7 +65,8 @@ pub struct Place<'tcx> {
9465/// A `PlaceWithHirId` represents how a value is located in memory.
9566///
9667/// 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 ) ]
9870pub struct PlaceWithHirId < ' tcx > {
9971 /// `HirId` of the expression or pattern producing this value.
10072 pub hir_id : HirId ,
0 commit comments