@@ -931,8 +931,9 @@ pub fn trans_field_ptr<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, r: &Repr<
931
931
}
932
932
}
933
933
934
- pub fn struct_field_ptr < ' fcx , ' blk , ' tcx > ( bcx : Block < ' fcx , ' blk , ' tcx > , st : & Struct < ' tcx > , val : ValueRef ,
935
- ix : uint , needs_cast : bool ) -> ValueRef {
934
+ pub fn struct_field_ptr < ' fcx , ' blk , ' tcx > ( bcx : Block < ' fcx , ' blk , ' tcx > ,
935
+ st : & Struct < ' tcx > , val : ValueRef ,
936
+ ix : uint , needs_cast : bool ) -> ValueRef {
936
937
let val = if needs_cast {
937
938
let ccx = bcx. ccx ( ) ;
938
939
let fields = st. fields . iter ( ) . map ( |& ty| type_of:: type_of ( ccx, ty) ) . collect :: < Vec < _ > > ( ) ;
@@ -946,10 +947,10 @@ pub fn struct_field_ptr<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, st: &Str
946
947
}
947
948
948
949
pub fn fold_variants < ' fcx , ' blk , ' tcx , F > ( bcx : Block < ' fcx , ' blk , ' tcx > ,
949
- r : & Repr < ' tcx > ,
950
- value : ValueRef ,
951
- mut f : F )
952
- -> Block < ' fcx , ' blk , ' tcx > where
950
+ r : & Repr < ' tcx > ,
951
+ value : ValueRef ,
952
+ mut f : F )
953
+ -> Block < ' fcx , ' blk , ' tcx > where
953
954
F : FnMut ( Block < ' fcx , ' blk , ' tcx > , & Struct < ' tcx > , ValueRef ) -> Block < ' fcx , ' blk , ' tcx > ,
954
955
{
955
956
let fcx = bcx. fcx ;
@@ -989,8 +990,10 @@ pub fn fold_variants<'fcx, 'blk, 'tcx, F>(bcx: Block<'fcx, 'blk, 'tcx>,
989
990
}
990
991
991
992
/// Access the struct drop flag, if present.
992
- pub fn trans_drop_flag_ptr < ' fcx , ' blk , ' tcx > ( mut bcx : Block < ' fcx , ' blk , ' tcx > , r : & Repr < ' tcx > , val : ValueRef )
993
- -> datum:: DatumBlock < ' fcx , ' blk , ' tcx , datum:: Expr > {
993
+ pub fn trans_drop_flag_ptr < ' fcx , ' blk , ' tcx > ( mut bcx : Block < ' fcx , ' blk , ' tcx > ,
994
+ r : & Repr < ' tcx > ,
995
+ val : ValueRef )
996
+ -> datum:: DatumBlock < ' fcx , ' blk , ' tcx , datum:: Expr > {
994
997
let tcx = bcx. tcx ( ) ;
995
998
let ptr_ty = ty:: mk_imm_ptr ( bcx. tcx ( ) , tcx. types . bool ) ;
996
999
match * r {
0 commit comments