@@ -785,13 +785,6 @@ pub struct LocalDecl<'tcx> {
785785 /// generator.
786786 pub internal : bool ,
787787
788- /// If this local is a temporary and `is_block_tail` is `Some`,
789- /// then it is a temporary created for evaluation of some
790- /// subexpression of some block's tail expression (with no
791- /// intervening statement context).
792- // FIXME(matthewjasper) Don't store in this in `Body`
793- pub is_block_tail : Option < BlockTailInfo > ,
794-
795788 /// The type of this local.
796789 pub ty : Ty < ' tcx > ,
797790
@@ -905,6 +898,10 @@ pub enum LocalInfo<'tcx> {
905898 /// A temporary created during the creation of an aggregate
906899 /// (e.g. a temporary for `foo` in `MyStruct { my_field: foo }`)
907900 AggregateTemp ,
901+ /// A temporary created for evaluation of some subexpression of some block's tail expression
902+ /// (with no intervening statement context).
903+ // FIXME(matthewjasper) Don't store in this in `Body`
904+ BlockTailTemp ( BlockTailInfo ) ,
908905 /// A temporary created during the pass `Derefer` to avoid it's retagging
909906 DerefTemp ,
910907 /// A temporary created for borrow checking.
@@ -1018,7 +1015,6 @@ impl<'tcx> LocalDecl<'tcx> {
10181015 mutability : Mutability :: Mut ,
10191016 local_info : ClearCrossCrate :: Set ( Box :: new ( LocalInfo :: Boring ) ) ,
10201017 internal : false ,
1021- is_block_tail : None ,
10221018 ty,
10231019 user_ty : None ,
10241020 source_info,
@@ -1038,14 +1034,6 @@ impl<'tcx> LocalDecl<'tcx> {
10381034 self . mutability = Mutability :: Not ;
10391035 self
10401036 }
1041-
1042- /// Converts `self` into same `LocalDecl` except tagged as internal temporary.
1043- #[ inline]
1044- pub fn block_tail ( mut self , info : BlockTailInfo ) -> Self {
1045- assert ! ( self . is_block_tail. is_none( ) ) ;
1046- self . is_block_tail = Some ( info) ;
1047- self
1048- }
10491037}
10501038
10511039#[ derive( Clone , TyEncodable , TyDecodable , HashStable , TypeFoldable , TypeVisitable ) ]
@@ -3106,7 +3094,7 @@ mod size_asserts {
31063094 use rustc_data_structures:: static_assert_size;
31073095 // tidy-alphabetical-start
31083096 static_assert_size ! ( BasicBlockData <' _>, 144 ) ;
3109- static_assert_size ! ( LocalDecl <' _>, 56 ) ;
3097+ static_assert_size ! ( LocalDecl <' _>, 40 ) ;
31103098 static_assert_size ! ( Statement <' _>, 32 ) ;
31113099 static_assert_size ! ( StatementKind <' _>, 16 ) ;
31123100 static_assert_size ! ( Terminator <' _>, 112 ) ;
0 commit comments