@@ -785,13 +785,6 @@ pub struct LocalDecl<'tcx> {
785
785
/// generator.
786
786
pub internal : bool ,
787
787
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
-
795
788
/// The type of this local.
796
789
pub ty : Ty < ' tcx > ,
797
790
@@ -905,6 +898,10 @@ pub enum LocalInfo<'tcx> {
905
898
/// A temporary created during the creation of an aggregate
906
899
/// (e.g. a temporary for `foo` in `MyStruct { my_field: foo }`)
907
900
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 ) ,
908
905
/// A temporary created during the pass `Derefer` to avoid it's retagging
909
906
DerefTemp ,
910
907
/// A temporary created for borrow checking.
@@ -1018,7 +1015,6 @@ impl<'tcx> LocalDecl<'tcx> {
1018
1015
mutability : Mutability :: Mut ,
1019
1016
local_info : ClearCrossCrate :: Set ( Box :: new ( LocalInfo :: Boring ) ) ,
1020
1017
internal : false ,
1021
- is_block_tail : None ,
1022
1018
ty,
1023
1019
user_ty : None ,
1024
1020
source_info,
@@ -1038,14 +1034,6 @@ impl<'tcx> LocalDecl<'tcx> {
1038
1034
self . mutability = Mutability :: Not ;
1039
1035
self
1040
1036
}
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
- }
1049
1037
}
1050
1038
1051
1039
#[ derive( Clone , TyEncodable , TyDecodable , HashStable , TypeFoldable , TypeVisitable ) ]
@@ -3106,7 +3094,7 @@ mod size_asserts {
3106
3094
use rustc_data_structures:: static_assert_size;
3107
3095
// tidy-alphabetical-start
3108
3096
static_assert_size ! ( BasicBlockData <' _>, 144 ) ;
3109
- static_assert_size ! ( LocalDecl <' _>, 56 ) ;
3097
+ static_assert_size ! ( LocalDecl <' _>, 40 ) ;
3110
3098
static_assert_size ! ( Statement <' _>, 32 ) ;
3111
3099
static_assert_size ! ( StatementKind <' _>, 16 ) ;
3112
3100
static_assert_size ! ( Terminator <' _>, 112 ) ;
0 commit comments