@@ -124,6 +124,15 @@ pub struct Adt<'tcx> {
124
124
pub base : Option < FruInfo < ' tcx > > ,
125
125
}
126
126
127
+ #[ derive( Clone , Debug , HashStable ) ]
128
+ pub struct ClosureExpr < ' tcx > {
129
+ pub closure_id : LocalDefId ,
130
+ pub substs : UpvarSubsts < ' tcx > ,
131
+ pub upvars : Box < [ ExprId ] > ,
132
+ pub movability : Option < hir:: Movability > ,
133
+ pub fake_reads : Vec < ( ExprId , FakeReadCause , hir:: HirId ) > ,
134
+ }
135
+
127
136
#[ derive( Copy , Clone , Debug , HashStable ) ]
128
137
pub enum BlockSafety {
129
138
Safe ,
@@ -387,13 +396,7 @@ pub enum ExprKind<'tcx> {
387
396
user_ty : UserTy < ' tcx > ,
388
397
} ,
389
398
/// A closure definition.
390
- Closure {
391
- closure_id : LocalDefId ,
392
- substs : UpvarSubsts < ' tcx > ,
393
- upvars : Box < [ ExprId ] > ,
394
- movability : Option < hir:: Movability > ,
395
- fake_reads : Vec < ( ExprId , FakeReadCause , hir:: HirId ) > ,
396
- } ,
399
+ Closure ( Box < ClosureExpr < ' tcx > > ) ,
397
400
/// A literal.
398
401
Literal {
399
402
lit : & ' tcx hir:: Lit ,
@@ -801,7 +804,7 @@ mod size_asserts {
801
804
use super :: * ;
802
805
// These are in alphabetical order, which is easy to maintain.
803
806
static_assert_size ! ( Block , 56 ) ;
804
- static_assert_size ! ( Expr <' _>, 88 ) ;
807
+ static_assert_size ! ( Expr <' _>, 80 ) ;
805
808
static_assert_size ! ( Pat <' _>, 24 ) ;
806
809
static_assert_size ! ( Stmt <' _>, 72 ) ;
807
810
}
0 commit comments