@@ -18,7 +18,7 @@ use rustc_hir as hir;
1818use rustc_hir:: def_id:: DefId ;
1919use rustc_hir:: { BindingMode , ByRef , HirId , MatchSource , RangeEnd } ;
2020use rustc_index:: { IndexVec , newtype_index} ;
21- use rustc_macros:: { HashStable , TyDecodable , TyEncodable , TypeVisitable } ;
21+ use rustc_macros:: { HashStable , TypeVisitable } ;
2222use rustc_middle:: middle:: region;
2323use rustc_middle:: mir:: interpret:: AllocId ;
2424use rustc_middle:: mir:: { self , BinOp , BorrowKind , FakeReadCause , UnOp } ;
@@ -53,7 +53,7 @@ macro_rules! thir_with_elements {
5353 /// A container for a THIR body.
5454 ///
5555 /// This can be indexed directly by any THIR index (e.g. [`ExprId`]).
56- #[ derive( Debug , HashStable , Clone ) ]
56+ #[ derive( Debug , HashStable ) ]
5757 pub struct Thir <' tcx> {
5858 $(
5959 pub $field_name: $field_ty,
@@ -98,14 +98,14 @@ thir_with_elements! {
9898 params: ParamId => Param <' tcx> => "p{}" ,
9999}
100100
101- #[ derive( Debug , HashStable , Clone ) ]
101+ #[ derive( Debug , HashStable ) ]
102102pub enum BodyTy < ' tcx > {
103103 Const ( Ty < ' tcx > ) ,
104104 Fn ( FnSig < ' tcx > ) ,
105105}
106106
107107/// Description of a type-checked function parameter.
108- #[ derive( Clone , Debug , HashStable ) ]
108+ #[ derive( Debug , HashStable ) ]
109109pub struct Param < ' tcx > {
110110 /// The pattern that appears in the parameter list, or None for implicit parameters.
111111 pub pat : Option < Box < Pat < ' tcx > > > ,
@@ -125,7 +125,7 @@ pub enum LintLevel {
125125 Explicit ( HirId ) ,
126126}
127127
128- #[ derive( Clone , Debug , HashStable ) ]
128+ #[ derive( Debug , HashStable ) ]
129129pub struct Block {
130130 /// Whether the block itself has a label. Used by `label: {}`
131131 /// and `try` blocks.
@@ -145,7 +145,7 @@ pub struct Block {
145145
146146type UserTy < ' tcx > = Option < Box < CanonicalUserType < ' tcx > > > ;
147147
148- #[ derive( Clone , Debug , HashStable ) ]
148+ #[ derive( Debug , HashStable ) ]
149149pub struct AdtExpr < ' tcx > {
150150 /// The ADT we're constructing.
151151 pub adt_def : AdtDef < ' tcx > ,
@@ -162,7 +162,7 @@ pub struct AdtExpr<'tcx> {
162162 pub base : AdtExprBase < ' tcx > ,
163163}
164164
165- #[ derive( Clone , Debug , HashStable ) ]
165+ #[ derive( Debug , HashStable ) ]
166166pub enum AdtExprBase < ' tcx > {
167167 /// A struct expression where all the fields are explicitly enumerated: `Foo { a, b }`.
168168 None ,
@@ -175,7 +175,7 @@ pub enum AdtExprBase<'tcx> {
175175 DefaultFields ( Box < [ Ty < ' tcx > ] > ) ,
176176}
177177
178- #[ derive( Clone , Debug , HashStable ) ]
178+ #[ derive( Debug , HashStable ) ]
179179pub struct ClosureExpr < ' tcx > {
180180 pub closure_id : LocalDefId ,
181181 pub args : UpvarArgs < ' tcx > ,
@@ -184,7 +184,7 @@ pub struct ClosureExpr<'tcx> {
184184 pub fake_reads : Vec < ( ExprId , FakeReadCause , HirId ) > ,
185185}
186186
187- #[ derive( Clone , Debug , HashStable ) ]
187+ #[ derive( Debug , HashStable ) ]
188188pub struct InlineAsmExpr < ' tcx > {
189189 pub asm_macro : AsmMacro ,
190190 pub template : & ' tcx [ InlineAsmTemplatePiece ] ,
@@ -202,12 +202,12 @@ pub enum BlockSafety {
202202 ExplicitUnsafe ( HirId ) ,
203203}
204204
205- #[ derive( Clone , Debug , HashStable ) ]
205+ #[ derive( Debug , HashStable ) ]
206206pub struct Stmt < ' tcx > {
207207 pub kind : StmtKind < ' tcx > ,
208208}
209209
210- #[ derive( Clone , Debug , HashStable ) ]
210+ #[ derive( Debug , HashStable ) ]
211211pub enum StmtKind < ' tcx > {
212212 /// An expression with a trailing semicolon.
213213 Expr {
@@ -247,11 +247,11 @@ pub enum StmtKind<'tcx> {
247247 } ,
248248}
249249
250- #[ derive( Clone , Debug , Copy , PartialEq , Eq , Hash , HashStable , TyEncodable , TyDecodable ) ]
250+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , HashStable ) ]
251251pub struct LocalVarId ( pub HirId ) ;
252252
253253/// A THIR expression.
254- #[ derive( Clone , Debug , HashStable ) ]
254+ #[ derive( Debug , HashStable ) ]
255255pub struct Expr < ' tcx > {
256256 /// kind of expression
257257 pub kind : ExprKind < ' tcx > ,
@@ -278,7 +278,7 @@ pub struct TempLifetime {
278278 pub backwards_incompatible : Option < region:: Scope > ,
279279}
280280
281- #[ derive( Clone , Debug , HashStable ) ]
281+ #[ derive( Debug , HashStable ) ]
282282pub enum ExprKind < ' tcx > {
283283 /// `Scope`s are used to explicitly mark destruction scopes,
284284 /// and to track the `HirId` of the expressions within the scope.
@@ -556,20 +556,20 @@ pub enum ExprKind<'tcx> {
556556/// Represents the association of a field identifier and an expression.
557557///
558558/// This is used in struct constructors.
559- #[ derive( Clone , Debug , HashStable ) ]
559+ #[ derive( Debug , HashStable ) ]
560560pub struct FieldExpr {
561561 pub name : FieldIdx ,
562562 pub expr : ExprId ,
563563}
564564
565- #[ derive( Clone , Debug , HashStable ) ]
565+ #[ derive( Debug , HashStable ) ]
566566pub struct FruInfo < ' tcx > {
567567 pub base : ExprId ,
568568 pub field_types : Box < [ Ty < ' tcx > ] > ,
569569}
570570
571571/// A `match` arm.
572- #[ derive( Clone , Debug , HashStable ) ]
572+ #[ derive( Debug , HashStable ) ]
573573pub struct Arm < ' tcx > {
574574 pub pattern : Box < Pat < ' tcx > > ,
575575 pub guard : Option < ExprId > ,
@@ -587,7 +587,7 @@ pub enum LogicalOp {
587587 Or ,
588588}
589589
590- #[ derive( Clone , Debug , HashStable ) ]
590+ #[ derive( Debug , HashStable ) ]
591591pub enum InlineAsmOperand < ' tcx > {
592592 In {
593593 reg : InlineAsmRegOrRegClass ,
@@ -625,13 +625,13 @@ pub enum InlineAsmOperand<'tcx> {
625625 } ,
626626}
627627
628- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
628+ #[ derive( Debug , HashStable , TypeVisitable ) ]
629629pub struct FieldPat < ' tcx > {
630630 pub field : FieldIdx ,
631631 pub pattern : Box < Pat < ' tcx > > ,
632632}
633633
634- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
634+ #[ derive( Debug , HashStable , TypeVisitable ) ]
635635pub struct Pat < ' tcx > {
636636 pub ty : Ty < ' tcx > ,
637637 pub span : Span ,
@@ -739,7 +739,7 @@ impl<'tcx> Pat<'tcx> {
739739 }
740740}
741741
742- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
742+ #[ derive( Debug , HashStable , TypeVisitable ) ]
743743pub struct Ascription < ' tcx > {
744744 pub annotation : CanonicalUserTypeAnnotation < ' tcx > ,
745745 /// Variance to use when relating the `user_ty` to the **type of the value being
@@ -763,7 +763,7 @@ pub struct Ascription<'tcx> {
763763 pub variance : ty:: Variance ,
764764}
765765
766- #[ derive( Clone , Debug , HashStable , TypeVisitable ) ]
766+ #[ derive( Debug , HashStable , TypeVisitable ) ]
767767pub enum PatKind < ' tcx > {
768768 /// A wildcard pattern: `_`.
769769 Wild ,
0 commit comments