@@ -124,6 +124,15 @@ pub struct Adt<'tcx> {
124124 pub base : Option < FruInfo < ' tcx > > ,
125125}
126126
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+
127136#[ derive( Copy , Clone , Debug , HashStable ) ]
128137pub enum BlockSafety {
129138 Safe ,
@@ -387,13 +396,7 @@ pub enum ExprKind<'tcx> {
387396 user_ty : UserTy < ' tcx > ,
388397 } ,
389398 /// 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 > > ) ,
397400 /// A literal.
398401 Literal {
399402 lit : & ' tcx hir:: Lit ,
@@ -801,7 +804,7 @@ mod size_asserts {
801804 use super :: * ;
802805 // These are in alphabetical order, which is easy to maintain.
803806 static_assert_size ! ( Block , 56 ) ;
804- static_assert_size ! ( Expr <' _>, 88 ) ;
807+ static_assert_size ! ( Expr <' _>, 80 ) ;
805808 static_assert_size ! ( Pat <' _>, 24 ) ;
806809 static_assert_size ! ( Stmt <' _>, 72 ) ;
807810}
0 commit comments