@@ -143,7 +143,7 @@ pub struct Struct {
143
143
* these, for places in trans where the `ty::t` isn't directly
144
144
* available.
145
145
*/
146
- pub fn represent_node ( bcx : & Block , node : ast:: NodeId ) -> Rc < Repr > {
146
+ pub fn represent_node ( bcx : Block , node : ast:: NodeId ) -> Rc < Repr > {
147
147
represent_type ( bcx. ccx ( ) , node_id_type ( bcx, node) )
148
148
}
149
149
@@ -574,7 +574,7 @@ fn struct_llfields(cx: &CrateContext, st: &Struct, sizing: bool, dst: bool) -> V
574
574
*
575
575
* This should ideally be less tightly tied to `_match`.
576
576
*/
577
- pub fn trans_switch ( bcx : & Block , r : & Repr , scrutinee : ValueRef )
577
+ pub fn trans_switch ( bcx : Block , r : & Repr , scrutinee : ValueRef )
578
578
-> ( _match:: BranchKind , Option < ValueRef > ) {
579
579
match * r {
580
580
CEnum ( ..) | General ( ..) |
@@ -590,7 +590,7 @@ pub fn trans_switch(bcx: &Block, r: &Repr, scrutinee: ValueRef)
590
590
591
591
592
592
/// Obtain the actual discriminant of a value.
593
- pub fn trans_get_discr ( bcx : & Block , r : & Repr , scrutinee : ValueRef , cast_to : Option < Type > )
593
+ pub fn trans_get_discr ( bcx : Block , r : & Repr , scrutinee : ValueRef , cast_to : Option < Type > )
594
594
-> ValueRef {
595
595
let signed;
596
596
let val;
@@ -625,7 +625,7 @@ pub fn trans_get_discr(bcx: &Block, r: &Repr, scrutinee: ValueRef, cast_to: Opti
625
625
}
626
626
}
627
627
628
- fn struct_wrapped_nullable_bitdiscr ( bcx : & Block , nndiscr : Disr , ptrfield : PointerField ,
628
+ fn struct_wrapped_nullable_bitdiscr ( bcx : Block , nndiscr : Disr , ptrfield : PointerField ,
629
629
scrutinee : ValueRef ) -> ValueRef {
630
630
let llptrptr = match ptrfield {
631
631
ThinPointer ( field) => GEPi ( bcx, scrutinee, [ 0 , field] ) ,
@@ -637,7 +637,7 @@ fn struct_wrapped_nullable_bitdiscr(bcx: &Block, nndiscr: Disr, ptrfield: Pointe
637
637
}
638
638
639
639
/// Helper for cases where the discriminant is simply loaded.
640
- fn load_discr ( bcx : & Block , ity : IntType , ptr : ValueRef , min : Disr , max : Disr )
640
+ fn load_discr ( bcx : Block , ity : IntType , ptr : ValueRef , min : Disr , max : Disr )
641
641
-> ValueRef {
642
642
let llty = ll_inttype ( bcx. ccx ( ) , ity) ;
643
643
assert_eq ! ( val_ty( ptr) , llty. ptr_to( ) ) ;
@@ -666,8 +666,8 @@ fn load_discr(bcx: &Block, ity: IntType, ptr: ValueRef, min: Disr, max: Disr)
666
666
*
667
667
* This should ideally be less tightly tied to `_match`.
668
668
*/
669
- pub fn trans_case < ' a > ( bcx : & ' a Block < ' a > , r : & Repr , discr : Disr )
670
- -> _match:: OptResult < ' a > {
669
+ pub fn trans_case < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > , r : & Repr , discr : Disr )
670
+ -> _match:: OptResult < ' blk , ' tcx > {
671
671
match * r {
672
672
CEnum ( ity, _, _) => {
673
673
_match:: SingleResult ( Result :: new ( bcx, C_integral ( ll_inttype ( bcx. ccx ( ) , ity) ,
@@ -692,7 +692,7 @@ pub fn trans_case<'a>(bcx: &'a Block<'a>, r: &Repr, discr: Disr)
692
692
* Set the discriminant for a new value of the given case of the given
693
693
* representation.
694
694
*/
695
- pub fn trans_set_discr ( bcx : & Block , r : & Repr , val : ValueRef , discr : Disr ) {
695
+ pub fn trans_set_discr ( bcx : Block , r : & Repr , val : ValueRef , discr : Disr ) {
696
696
match * r {
697
697
CEnum ( ity, min, max) => {
698
698
assert_discr_in_range ( ity, min, max, discr) ;
@@ -770,7 +770,7 @@ pub fn num_args(r: &Repr, discr: Disr) -> uint {
770
770
}
771
771
772
772
/// Access a field, at a point when the value's case is known.
773
- pub fn trans_field_ptr ( bcx : & Block , r : & Repr , val : ValueRef , discr : Disr ,
773
+ pub fn trans_field_ptr ( bcx : Block , r : & Repr , val : ValueRef , discr : Disr ,
774
774
ix : uint ) -> ValueRef {
775
775
// Note: if this ever needs to generate conditionals (e.g., if we
776
776
// decide to do some kind of cdr-coding-like non-unique repr
@@ -809,7 +809,7 @@ pub fn trans_field_ptr(bcx: &Block, r: &Repr, val: ValueRef, discr: Disr,
809
809
}
810
810
}
811
811
812
- pub fn struct_field_ptr ( bcx : & Block , st : & Struct , val : ValueRef ,
812
+ pub fn struct_field_ptr ( bcx : Block , st : & Struct , val : ValueRef ,
813
813
ix : uint , needs_cast : bool ) -> ValueRef {
814
814
let val = if needs_cast {
815
815
let ccx = bcx. ccx ( ) ;
@@ -823,10 +823,10 @@ pub fn struct_field_ptr(bcx: &Block, st: &Struct, val: ValueRef,
823
823
GEPi ( bcx, val, [ 0 , ix] )
824
824
}
825
825
826
- pub fn fold_variants < ' r , ' b > (
827
- bcx : & ' b Block < ' b > , r : & Repr , value : ValueRef ,
828
- f : |& ' b Block < ' b > , & Struct , ValueRef |: ' r -> & ' b Block <' b>
829
- ) -> & ' b Block <' b > {
826
+ pub fn fold_variants < ' blk , ' tcx > (
827
+ bcx : Block < ' blk , ' tcx > , r : & Repr , value : ValueRef ,
828
+ f : |Block < ' blk , ' tcx > , & Struct , ValueRef | -> Block < ' blk , ' tcx > )
829
+ -> Block < ' blk , ' tcx > {
830
830
let fcx = bcx. fcx;
831
831
match * r {
832
832
Univariant ( ref st, _) => {
@@ -864,8 +864,8 @@ pub fn fold_variants<'r, 'b>(
864
864
}
865
865
866
866
/// Access the struct drop flag, if present.
867
- pub fn trans_drop_flag_ptr < ' b > ( mut bcx : & ' b Block < ' b > , r : & Repr ,
868
- val : ValueRef ) -> datum:: DatumBlock < ' b , datum:: Expr > {
867
+ pub fn trans_drop_flag_ptr < ' blk , ' tcx > ( mut bcx : Block < ' blk , ' tcx > , r : & Repr , val : ValueRef )
868
+ -> datum:: DatumBlock < ' blk , ' tcx , datum:: Expr > {
869
869
let ptr_ty = ty:: mk_imm_ptr ( bcx. tcx ( ) , ty:: mk_bool ( ) ) ;
870
870
match * r {
871
871
Univariant ( ref st, true ) => {
0 commit comments