@@ -18,7 +18,7 @@ use rustc_hir as hir;
18
18
use rustc_hir:: def_id:: DefId ;
19
19
use rustc_hir:: { BindingMode , ByRef , HirId , MatchSource , RangeEnd } ;
20
20
use rustc_index:: { IndexVec , newtype_index} ;
21
- use rustc_macros:: { HashStable , TyDecodable , TyEncodable , TypeVisitable } ;
21
+ use rustc_macros:: { HashStable , TypeVisitable } ;
22
22
use rustc_middle:: middle:: region;
23
23
use rustc_middle:: mir:: interpret:: AllocId ;
24
24
use rustc_middle:: mir:: { self , BinOp , BorrowKind , FakeReadCause , UnOp } ;
@@ -53,7 +53,7 @@ macro_rules! thir_with_elements {
53
53
/// A container for a THIR body.
54
54
///
55
55
/// This can be indexed directly by any THIR index (e.g. [`ExprId`]).
56
- #[ derive( Debug , HashStable , Clone ) ]
56
+ #[ derive( Debug , HashStable ) ]
57
57
pub struct Thir <' tcx> {
58
58
$(
59
59
pub $field_name: $field_ty,
@@ -98,14 +98,14 @@ thir_with_elements! {
98
98
params: ParamId => Param <' tcx> => "p{}" ,
99
99
}
100
100
101
- #[ derive( Debug , HashStable , Clone ) ]
101
+ #[ derive( Debug , HashStable ) ]
102
102
pub enum BodyTy < ' tcx > {
103
103
Const ( Ty < ' tcx > ) ,
104
104
Fn ( FnSig < ' tcx > ) ,
105
105
}
106
106
107
107
/// Description of a type-checked function parameter.
108
- #[ derive( Clone , Debug , HashStable ) ]
108
+ #[ derive( Debug , HashStable ) ]
109
109
pub struct Param < ' tcx > {
110
110
/// The pattern that appears in the parameter list, or None for implicit parameters.
111
111
pub pat : Option < Box < Pat < ' tcx > > > ,
@@ -125,7 +125,7 @@ pub enum LintLevel {
125
125
Explicit ( HirId ) ,
126
126
}
127
127
128
- #[ derive( Clone , Debug , HashStable ) ]
128
+ #[ derive( Debug , HashStable ) ]
129
129
pub struct Block {
130
130
/// Whether the block itself has a label. Used by `label: {}`
131
131
/// and `try` blocks.
@@ -145,7 +145,7 @@ pub struct Block {
145
145
146
146
type UserTy < ' tcx > = Option < Box < CanonicalUserType < ' tcx > > > ;
147
147
148
- #[ derive( Clone , Debug , HashStable ) ]
148
+ #[ derive( Debug , HashStable ) ]
149
149
pub struct AdtExpr < ' tcx > {
150
150
/// The ADT we're constructing.
151
151
pub adt_def : AdtDef < ' tcx > ,
@@ -162,7 +162,7 @@ pub struct AdtExpr<'tcx> {
162
162
pub base : AdtExprBase < ' tcx > ,
163
163
}
164
164
165
- #[ derive( Clone , Debug , HashStable ) ]
165
+ #[ derive( Debug , HashStable ) ]
166
166
pub enum AdtExprBase < ' tcx > {
167
167
/// A struct expression where all the fields are explicitly enumerated: `Foo { a, b }`.
168
168
None ,
@@ -175,7 +175,7 @@ pub enum AdtExprBase<'tcx> {
175
175
DefaultFields ( Box < [ Ty < ' tcx > ] > ) ,
176
176
}
177
177
178
- #[ derive( Clone , Debug , HashStable ) ]
178
+ #[ derive( Debug , HashStable ) ]
179
179
pub struct ClosureExpr < ' tcx > {
180
180
pub closure_id : LocalDefId ,
181
181
pub args : UpvarArgs < ' tcx > ,
@@ -184,7 +184,7 @@ pub struct ClosureExpr<'tcx> {
184
184
pub fake_reads : Vec < ( ExprId , FakeReadCause , HirId ) > ,
185
185
}
186
186
187
- #[ derive( Clone , Debug , HashStable ) ]
187
+ #[ derive( Debug , HashStable ) ]
188
188
pub struct InlineAsmExpr < ' tcx > {
189
189
pub asm_macro : AsmMacro ,
190
190
pub template : & ' tcx [ InlineAsmTemplatePiece ] ,
@@ -202,12 +202,12 @@ pub enum BlockSafety {
202
202
ExplicitUnsafe ( HirId ) ,
203
203
}
204
204
205
- #[ derive( Clone , Debug , HashStable ) ]
205
+ #[ derive( Debug , HashStable ) ]
206
206
pub struct Stmt < ' tcx > {
207
207
pub kind : StmtKind < ' tcx > ,
208
208
}
209
209
210
- #[ derive( Clone , Debug , HashStable ) ]
210
+ #[ derive( Debug , HashStable ) ]
211
211
pub enum StmtKind < ' tcx > {
212
212
/// An expression with a trailing semicolon.
213
213
Expr {
@@ -247,11 +247,11 @@ pub enum StmtKind<'tcx> {
247
247
} ,
248
248
}
249
249
250
- #[ derive( Clone , Debug , Copy , PartialEq , Eq , Hash , HashStable , TyEncodable , TyDecodable ) ]
250
+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , HashStable ) ]
251
251
pub struct LocalVarId ( pub HirId ) ;
252
252
253
253
/// A THIR expression.
254
- #[ derive( Clone , Debug , HashStable ) ]
254
+ #[ derive( Debug , HashStable ) ]
255
255
pub struct Expr < ' tcx > {
256
256
/// kind of expression
257
257
pub kind : ExprKind < ' tcx > ,
@@ -278,7 +278,7 @@ pub struct TempLifetime {
278
278
pub backwards_incompatible : Option < region:: Scope > ,
279
279
}
280
280
281
- #[ derive( Clone , Debug , HashStable ) ]
281
+ #[ derive( Debug , HashStable ) ]
282
282
pub enum ExprKind < ' tcx > {
283
283
/// `Scope`s are used to explicitly mark destruction scopes,
284
284
/// and to track the `HirId` of the expressions within the scope.
@@ -543,20 +543,20 @@ pub enum ExprKind<'tcx> {
543
543
/// Represents the association of a field identifier and an expression.
544
544
///
545
545
/// This is used in struct constructors.
546
- #[ derive( Clone , Debug , HashStable ) ]
546
+ #[ derive( Debug , HashStable ) ]
547
547
pub struct FieldExpr {
548
548
pub name : FieldIdx ,
549
549
pub expr : ExprId ,
550
550
}
551
551
552
- #[ derive( Clone , Debug , HashStable ) ]
552
+ #[ derive( Debug , HashStable ) ]
553
553
pub struct FruInfo < ' tcx > {
554
554
pub base : ExprId ,
555
555
pub field_types : Box < [ Ty < ' tcx > ] > ,
556
556
}
557
557
558
558
/// A `match` arm.
559
- #[ derive( Clone , Debug , HashStable ) ]
559
+ #[ derive( Debug , HashStable ) ]
560
560
pub struct Arm < ' tcx > {
561
561
pub pattern : Box < Pat < ' tcx > > ,
562
562
pub guard : Option < ExprId > ,
@@ -574,7 +574,7 @@ pub enum LogicalOp {
574
574
Or ,
575
575
}
576
576
577
- #[ derive( Clone , Debug , HashStable ) ]
577
+ #[ derive( Debug , HashStable ) ]
578
578
pub enum InlineAsmOperand < ' tcx > {
579
579
In {
580
580
reg : InlineAsmRegOrRegClass ,
@@ -612,13 +612,13 @@ pub enum InlineAsmOperand<'tcx> {
612
612
} ,
613
613
}
614
614
615
- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
615
+ #[ derive( Debug , HashStable , TypeVisitable ) ]
616
616
pub struct FieldPat < ' tcx > {
617
617
pub field : FieldIdx ,
618
618
pub pattern : Box < Pat < ' tcx > > ,
619
619
}
620
620
621
- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
621
+ #[ derive( Debug , HashStable , TypeVisitable ) ]
622
622
pub struct Pat < ' tcx > {
623
623
pub ty : Ty < ' tcx > ,
624
624
pub span : Span ,
@@ -726,7 +726,7 @@ impl<'tcx> Pat<'tcx> {
726
726
}
727
727
}
728
728
729
- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
729
+ #[ derive( Debug , HashStable , TypeVisitable ) ]
730
730
pub struct Ascription < ' tcx > {
731
731
pub annotation : CanonicalUserTypeAnnotation < ' tcx > ,
732
732
/// Variance to use when relating the `user_ty` to the **type of the value being
@@ -750,7 +750,7 @@ pub struct Ascription<'tcx> {
750
750
pub variance : ty:: Variance ,
751
751
}
752
752
753
- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
753
+ #[ derive( Debug , HashStable , TypeVisitable ) ]
754
754
pub enum PatKind < ' tcx > {
755
755
/// A wildcard pattern: `_`.
756
756
Wild ,
0 commit comments