@@ -340,30 +340,30 @@ fn trans_opt<'a>(bcx: &'a Block<'a>, o: &Opt) -> opt_result<'a> {
340
340
let lit_datum = unpack_datum ! ( bcx, expr:: trans( bcx, lit_expr) ) ;
341
341
let lit_datum = lit_datum. assert_rvalue ( bcx) ; // literals are rvalues
342
342
let lit_datum = unpack_datum ! ( bcx, lit_datum. to_appropriate_datum( bcx) ) ;
343
- return single_result ( rslt ( bcx, lit_datum. val ) ) ;
343
+ return single_result ( Result :: new ( bcx, lit_datum. val ) ) ;
344
344
}
345
345
lit( UnitLikeStructLit ( pat_id) ) => {
346
346
let struct_ty = ty:: node_id_to_type ( bcx. tcx ( ) , pat_id) ;
347
347
let datum = datum:: rvalue_scratch_datum ( bcx, struct_ty, "" ) ;
348
- return single_result ( rslt ( bcx, datum. val ) ) ;
348
+ return single_result ( Result :: new ( bcx, datum. val ) ) ;
349
349
}
350
350
lit( ConstLit ( lit_id) ) => {
351
351
let ( llval, _) = consts:: get_const_val ( bcx. ccx ( ) , lit_id) ;
352
- return single_result ( rslt ( bcx, llval) ) ;
352
+ return single_result ( Result :: new ( bcx, llval) ) ;
353
353
}
354
354
var( disr_val, ref repr) => {
355
355
return adt:: trans_case ( bcx, & * * repr, disr_val) ;
356
356
}
357
357
range( l1, l2) => {
358
358
let ( l1, _) = consts:: const_expr ( ccx, l1, true ) ;
359
359
let ( l2, _) = consts:: const_expr ( ccx, l2, true ) ;
360
- return range_result ( rslt ( bcx, l1) , rslt ( bcx, l2) ) ;
360
+ return range_result ( Result :: new ( bcx, l1) , Result :: new ( bcx, l2) ) ;
361
361
}
362
362
vec_len( n, vec_len_eq, _) => {
363
- return single_result ( rslt ( bcx, C_int ( ccx, n as int ) ) ) ;
363
+ return single_result ( Result :: new ( bcx, C_int ( ccx, n as int ) ) ) ;
364
364
}
365
365
vec_len( n, vec_len_ge( _) , _) => {
366
- return lower_bound ( rslt ( bcx, C_int ( ccx, n as int ) ) ) ;
366
+ return lower_bound ( Result :: new ( bcx, C_int ( ccx, n as int ) ) ) ;
367
367
}
368
368
}
369
369
}
@@ -1311,7 +1311,7 @@ fn compare_values<'a>(
1311
1311
let _icx = push_ctxt ( "compare_values" ) ;
1312
1312
if ty:: type_is_scalar ( rhs_t) {
1313
1313
let rs = compare_scalar_types ( cx, lhs, rhs, rhs_t, ast:: BiEq ) ;
1314
- return rslt ( rs. bcx , rs. val ) ;
1314
+ return Result :: new ( rs. bcx , rs. val ) ;
1315
1315
}
1316
1316
1317
1317
match ty:: get ( rhs_t) . sty {
@@ -1742,7 +1742,7 @@ fn compile_submatch_continue<'a, 'b>(
1742
1742
compare_scalar_types (
1743
1743
bcx, test_val, vend,
1744
1744
t, ast:: BiLe ) ;
1745
- rslt ( bcx, And ( bcx, llge, llle) )
1745
+ Result :: new ( bcx, And ( bcx, llge, llle) )
1746
1746
}
1747
1747
}
1748
1748
} ;
@@ -1757,14 +1757,14 @@ fn compile_submatch_continue<'a, 'b>(
1757
1757
let value = compare_scalar_values (
1758
1758
bcx, test_val, val,
1759
1759
signed_int, ast:: BiEq ) ;
1760
- rslt ( bcx, value)
1760
+ Result :: new ( bcx, value)
1761
1761
}
1762
1762
lower_bound(
1763
1763
Result { bcx, val : val} ) => {
1764
1764
let value = compare_scalar_values (
1765
1765
bcx, test_val, val,
1766
1766
signed_int, ast:: BiGe ) ;
1767
- rslt ( bcx, value)
1767
+ Result :: new ( bcx, value)
1768
1768
}
1769
1769
range_result(
1770
1770
Result { val : vbegin, ..} ,
@@ -1777,7 +1777,7 @@ fn compile_submatch_continue<'a, 'b>(
1777
1777
compare_scalar_values (
1778
1778
bcx, test_val, vend,
1779
1779
signed_int, ast:: BiLe ) ;
1780
- rslt ( bcx, And ( bcx, llge, llle) )
1780
+ Result :: new ( bcx, And ( bcx, llge, llle) )
1781
1781
}
1782
1782
}
1783
1783
} ;
0 commit comments