@@ -314,7 +314,6 @@ pub fn variant_opt(bcx: block, pat_id: ast::node_id)
314
314
pub enum TransBindingMode {
315
315
TrByValue ( /*ismove:*/ bool , /*llbinding:*/ ValueRef ) ,
316
316
TrByRef ,
317
- TrByImplicitRef
318
317
}
319
318
320
319
/**
@@ -881,7 +880,7 @@ fn match_datum(bcx: block, val: ValueRef, pat_id: ast::node_id) -> Datum {
881
880
//! we should just pass around a Datum and be done with it.
882
881
883
882
let ty = node_id_type ( bcx, pat_id) ;
884
- Datum { val : val, ty : ty, mode : datum:: ByRef , source : RevokeClean }
883
+ Datum { val : val, ty : ty, mode : datum:: ByRef ( RevokeClean ) }
885
884
}
886
885
887
886
@@ -988,7 +987,7 @@ pub fn root_pats_as_necessary(mut bcx: block,
988
987
let pat_id = br. pats [ col] . id ;
989
988
if pat_id != 0 {
990
989
let datum = Datum { val : val, ty : node_id_type ( bcx, pat_id) ,
991
- mode : ByRef , source : ZeroMem } ;
990
+ mode : ByRef ( ZeroMem ) } ;
992
991
bcx = datum. root_and_write_guard ( bcx, br. pats [ col] . span , pat_id, 0 ) ;
993
992
}
994
993
}
@@ -1146,7 +1145,7 @@ pub fn store_non_ref_bindings(bcx: block,
1146
1145
TrByValue ( is_move, lldest) => {
1147
1146
let llval = Load ( bcx, binding_info. llmatch ) ; // get a T*
1148
1147
let datum = Datum { val : llval, ty : binding_info. ty ,
1149
- mode : ByRef , source : ZeroMem } ;
1148
+ mode : ByRef ( ZeroMem ) } ;
1150
1149
bcx = {
1151
1150
if is_move {
1152
1151
datum. move_to ( bcx, INIT , lldest)
@@ -1161,7 +1160,7 @@ pub fn store_non_ref_bindings(bcx: block,
1161
1160
temp_cleanups
1162
1161
}
1163
1162
}
1164
- TrByRef | TrByImplicitRef => { }
1163
+ TrByRef => { }
1165
1164
}
1166
1165
}
1167
1166
return bcx;
@@ -1192,13 +1191,6 @@ pub fn insert_lllocals(bcx: block,
1192
1191
TrByRef => {
1193
1192
binding_info. llmatch
1194
1193
}
1195
-
1196
- // Ugly: for implicit ref, we actually want a T*, but
1197
- // we have a T**, so we had to load. This will go away
1198
- // once implicit refs go away.
1199
- TrByImplicitRef => {
1200
- Load ( bcx, binding_info. llmatch )
1201
- }
1202
1194
} ;
1203
1195
1204
1196
bcx. fcx . lllocals . insert ( binding_info. id ,
@@ -1254,7 +1246,7 @@ pub fn compile_guard(bcx: block,
1254
1246
TrByValue ( _, llval) => {
1255
1247
bcx = glue:: drop_ty ( bcx, llval, binding_info. ty ) ;
1256
1248
}
1257
- TrByRef | TrByImplicitRef => { }
1249
+ TrByRef => { }
1258
1250
}
1259
1251
bcx. fcx . lllocals . remove ( & binding_info. id ) ;
1260
1252
}
@@ -1757,7 +1749,7 @@ pub fn bind_irrefutable_pat(bcx: block,
1757
1749
if make_copy {
1758
1750
let binding_ty = node_id_type ( bcx, pat. id ) ;
1759
1751
let datum = Datum { val : val, ty : binding_ty,
1760
- mode : ByRef , source : RevokeClean } ;
1752
+ mode : ByRef ( RevokeClean ) } ;
1761
1753
let scratch = scratch_datum ( bcx, binding_ty, false ) ;
1762
1754
datum. copy_to_datum ( bcx, INIT , scratch) ;
1763
1755
match binding_mode {
0 commit comments