@@ -3687,13 +3687,11 @@ fn autoderef(&@block_ctxt cx, ValueRef v, &ty::t t) -> result {
3687
3687
3688
3688
v1 = load_if_immediate( cx, v1, t1) ;
3689
3689
}
3690
- case ( _) {
3691
- ret res( cx, v1) ;
3692
- }
3690
+ case ( _) { break ; }
3693
3691
}
3694
3692
}
3695
3693
3696
- fail ; // fools the return-checker
3694
+ ret res ( cx , v1 ) ;
3697
3695
}
3698
3696
3699
3697
fn autoderefed_ty( & @crate_ctxt ccx, & ty:: t t) -> ty:: t {
@@ -3704,13 +3702,11 @@ fn autoderefed_ty(&@crate_ctxt ccx, &ty::t t) -> ty::t {
3704
3702
case ( ty:: ty_box( ?mt) ) {
3705
3703
t1 = mt. ty;
3706
3704
}
3707
- case ( _) {
3708
- ret t1;
3709
- }
3705
+ case ( _) { break ; }
3710
3706
}
3711
3707
}
3712
3708
3713
- fail ; // fools the return-checker
3709
+ ret t1 ;
3714
3710
}
3715
3711
3716
3712
fn trans_binary( & @block_ctxt cx, ast:: binop op,
@@ -3876,7 +3872,7 @@ fn trans_if(&@block_ctxt cx, &@ast::expr cond,
3876
3872
}
3877
3873
3878
3874
// FIXME: This isn't quite right, particularly re: dynamic types
3879
- auto expr_ty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx. node_types ,
3875
+ auto expr_ty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx,
3880
3876
ann) ;
3881
3877
if ( ty:: type_has_dynamic_size( cx. fcx. lcx. ccx. tcx, expr_ty) ) {
3882
3878
expr_llty = T_typaram_ptr ( cx. fcx. lcx. ccx. tn) ;
@@ -4260,7 +4256,7 @@ fn trans_pat_match(&@block_ctxt cx, &@ast::pat pat, ValueRef llval,
4260
4256
4261
4257
case ( ast:: pat_lit ( ?lt, ?ann) ) {
4262
4258
auto lllit = trans_lit ( cx. fcx . lcx . ccx , * lt, ann) ;
4263
- auto lltype = ty:: ann_to_type ( cx. fcx . lcx . ccx . tcx . node_types , ann) ;
4259
+ auto lltype = ty:: ann_to_type ( cx. fcx . lcx . ccx . tcx , ann) ;
4264
4260
auto lleq = trans_compare ( cx, ast:: eq, lltype, llval, lllit) ;
4265
4261
4266
4262
auto matched_cx = new_sub_block_ctxt ( lleq. bcx , "matched_cx" ) ;
@@ -4298,7 +4294,7 @@ fn trans_pat_match(&@block_ctxt cx, &@ast::pat pat, ValueRef llval,
4298
4294
cx. build. CondBr ( lleq, matched_cx. llbb, next_cx. llbb) ;
4299
4295
4300
4296
auto ty_params =
4301
- ty:: ann_to_type_params( cx. fcx. lcx. ccx. tcx. node_types , ann) ;
4297
+ ty:: ann_to_type_params( cx. fcx. lcx. ccx. tcx, ann) ;
4302
4298
4303
4299
if ( vec:: len[ @ast:: pat] ( subpats) > 0 u) {
4304
4300
auto llblobptr = matched_cx. build. GEP ( lltagptr,
@@ -4359,7 +4355,7 @@ fn trans_pat_binding(&@block_ctxt cx, &@ast::pat pat,
4359
4355
auto llblobptr = cx. build. GEP ( lltagptr, [ C_int ( 0 ) , C_int ( 1 ) ] ) ;
4360
4356
4361
4357
auto ty_param_substs =
4362
- ty:: ann_to_type_params( cx. fcx. lcx. ccx. tcx. node_types , ann) ;
4358
+ ty:: ann_to_type_params( cx. fcx. lcx. ccx. tcx, ann) ;
4363
4359
4364
4360
auto this_cx = cx;
4365
4361
auto i = 0 ;
@@ -4408,7 +4404,7 @@ fn trans_alt(&@block_ctxt cx, &@ast::expr expr,
4408
4404
"non-exhaustive match failure" ) ;
4409
4405
4410
4406
// FIXME: This isn't quite right, particularly re: dynamic types
4411
- auto expr_ty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx. node_types , ann) ;
4407
+ auto expr_ty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx, ann) ;
4412
4408
auto expr_llty;
4413
4409
if ( ty:: type_has_dynamic_size( cx. fcx. lcx. ccx. tcx, expr_ty) ) {
4414
4410
expr_llty = T_typaram_ptr ( cx. fcx. lcx. ccx. tn) ;
@@ -4473,8 +4469,8 @@ fn lval_generic_fn(&@block_ctxt cx,
4473
4469
lv = trans_external_path( cx, fn_id, tpt) ;
4474
4470
}
4475
4471
4476
- auto tys = ty:: ann_to_type_params( cx. fcx. lcx. ccx. tcx. node_types , ann) ;
4477
- auto monoty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx. node_types , ann) ;
4472
+ auto tys = ty:: ann_to_type_params( cx. fcx. lcx. ccx. tcx, ann) ;
4473
+ auto monoty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx, ann) ;
4478
4474
4479
4475
if ( vec:: len[ ty:: t] ( tys) != 0 u) {
4480
4476
auto bcx = lv. res. bcx;
@@ -5361,7 +5357,7 @@ fn trans_call(&@block_ctxt cx, &@ast::expr f,
5361
5357
5362
5358
}
5363
5359
5364
- auto ret_ty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx. node_types , ann) ;
5360
+ auto ret_ty = ty:: ann_to_type( cx. fcx. lcx. ccx. tcx, ann) ;
5365
5361
auto args_res = trans_args( f_res. res. bcx,
5366
5362
llenv, f_res. llobj,
5367
5363
f_res. generic,
@@ -6910,7 +6906,7 @@ fn is_terminated(&@block_ctxt cx) -> bool {
6910
6906
}
6911
6907
6912
6908
fn arg_tys_of_fn ( & @crate_ctxt ccx , ast:: ann ann) -> vec[ ty:: arg ] {
6913
- alt ( ty:: struct ( ccx. tcx , ty:: ann_to_type ( ccx. tcx . node_types , ann) ) ) {
6909
+ alt ( ty:: struct ( ccx. tcx , ty:: ann_to_type ( ccx. tcx , ann) ) ) {
6914
6910
case ( ty:: ty_fn ( _, ?arg_tys, _, _) ) {
6915
6911
ret arg_tys;
6916
6912
}
@@ -6927,7 +6923,7 @@ fn ret_ty_of_fn_ty(&@crate_ctxt ccx, ty::t t) -> ty::t {
6927
6923
6928
6924
6929
6925
fn ret_ty_of_fn ( & @crate_ctxt ccx , ast:: ann ann) -> ty:: t {
6930
- ret ret_ty_of_fn_ty ( ccx, ty:: ann_to_type ( ccx. tcx . node_types , ann) ) ;
6926
+ ret ret_ty_of_fn_ty ( ccx, ty:: ann_to_type ( ccx. tcx , ann) ) ;
6931
6927
}
6932
6928
6933
6929
fn populate_fn_ctxt_from_llself ( @fn_ctxt fcx , val_self_pair llself) {
0 commit comments