@@ -340,30 +340,30 @@ fn trans_opt<'a>(bcx: &'a Block<'a>, o: &Opt) -> opt_result<'a> {
340340 let lit_datum = unpack_datum ! ( bcx, expr:: trans( bcx, lit_expr) ) ;
341341 let lit_datum = lit_datum. assert_rvalue ( bcx) ; // literals are rvalues
342342 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 ) ) ;
344344 }
345345 lit( UnitLikeStructLit ( pat_id) ) => {
346346 let struct_ty = ty:: node_id_to_type ( bcx. tcx ( ) , pat_id) ;
347347 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 ) ) ;
349349 }
350350 lit( ConstLit ( lit_id) ) => {
351351 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) ) ;
353353 }
354354 var( disr_val, ref repr) => {
355355 return adt:: trans_case ( bcx, & * * repr, disr_val) ;
356356 }
357357 range( l1, l2) => {
358358 let ( l1, _) = consts:: const_expr ( ccx, l1, true ) ;
359359 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) ) ;
361361 }
362362 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 ) ) ) ;
364364 }
365365 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 ) ) ) ;
367367 }
368368 }
369369}
@@ -1311,7 +1311,7 @@ fn compare_values<'a>(
13111311 let _icx = push_ctxt ( "compare_values" ) ;
13121312 if ty:: type_is_scalar ( rhs_t) {
13131313 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 ) ;
13151315 }
13161316
13171317 match ty:: get ( rhs_t) . sty {
@@ -1742,7 +1742,7 @@ fn compile_submatch_continue<'a, 'b>(
17421742 compare_scalar_types (
17431743 bcx, test_val, vend,
17441744 t, ast:: BiLe ) ;
1745- rslt ( bcx, And ( bcx, llge, llle) )
1745+ Result :: new ( bcx, And ( bcx, llge, llle) )
17461746 }
17471747 }
17481748 } ;
@@ -1757,14 +1757,14 @@ fn compile_submatch_continue<'a, 'b>(
17571757 let value = compare_scalar_values (
17581758 bcx, test_val, val,
17591759 signed_int, ast:: BiEq ) ;
1760- rslt ( bcx, value)
1760+ Result :: new ( bcx, value)
17611761 }
17621762 lower_bound(
17631763 Result { bcx, val : val} ) => {
17641764 let value = compare_scalar_values (
17651765 bcx, test_val, val,
17661766 signed_int, ast:: BiGe ) ;
1767- rslt ( bcx, value)
1767+ Result :: new ( bcx, value)
17681768 }
17691769 range_result(
17701770 Result { val : vbegin, ..} ,
@@ -1777,7 +1777,7 @@ fn compile_submatch_continue<'a, 'b>(
17771777 compare_scalar_values (
17781778 bcx, test_val, vend,
17791779 signed_int, ast:: BiLe ) ;
1780- rslt ( bcx, And ( bcx, llge, llle) )
1780+ Result :: new ( bcx, And ( bcx, llge, llle) )
17811781 }
17821782 }
17831783 } ;
0 commit comments