@@ -449,14 +449,14 @@ fn find_scope_cx(cx: @block_ctxt) -> @block_ctxt {
449
449
// Accessors
450
450
// TODO: When we have overloading, simplify these names!
451
451
452
- fn bcx_tcx ( bcx : @block_ctxt ) -> ty:: ctxt { ret bcx. fcx . lcx . ccx . tcx ; }
453
- fn bcx_ccx ( bcx : @block_ctxt ) -> @crate_ctxt { ret bcx. fcx . lcx . ccx ; }
454
- fn bcx_lcx ( bcx : @block_ctxt ) -> @local_ctxt { ret bcx. fcx . lcx ; }
455
- fn bcx_fcx ( bcx : @block_ctxt ) -> @fn_ctxt { ret bcx. fcx ; }
456
- fn fcx_ccx ( fcx : @fn_ctxt ) -> @crate_ctxt { ret fcx. lcx . ccx ; }
457
- fn fcx_tcx ( fcx : @fn_ctxt ) -> ty:: ctxt { ret fcx. lcx . ccx . tcx ; }
458
- fn lcx_ccx ( lcx : @local_ctxt ) -> @crate_ctxt { ret lcx. ccx ; }
459
- fn ccx_tcx ( ccx : @crate_ctxt ) -> ty:: ctxt { ret ccx. tcx ; }
452
+ pure fn bcx_tcx ( bcx : @block_ctxt ) -> ty:: ctxt { bcx. fcx . lcx . ccx . tcx }
453
+ pure fn bcx_ccx ( bcx : @block_ctxt ) -> @crate_ctxt { bcx. fcx . lcx . ccx }
454
+ pure fn bcx_lcx ( bcx : @block_ctxt ) -> @local_ctxt { bcx. fcx . lcx }
455
+ pure fn bcx_fcx ( bcx : @block_ctxt ) -> @fn_ctxt { bcx. fcx }
456
+ pure fn fcx_ccx ( fcx : @fn_ctxt ) -> @crate_ctxt { fcx. lcx . ccx }
457
+ pure fn fcx_tcx ( fcx : @fn_ctxt ) -> ty:: ctxt { fcx. lcx . ccx . tcx }
458
+ pure fn lcx_ccx ( lcx : @local_ctxt ) -> @crate_ctxt { lcx. ccx }
459
+ pure fn ccx_tcx ( ccx : @crate_ctxt ) -> ty:: ctxt { ccx. tcx }
460
460
461
461
// LLVM type constructors.
462
462
fn T_void ( ) -> TypeRef {
@@ -861,6 +861,11 @@ pure fn returns_non_ty_var(cx: @crate_ctxt, t: ty::t) -> bool {
861
861
non_ty_var ( cx, ty:: ty_fn_ret ( cx. tcx , t) )
862
862
}
863
863
864
+ pure fn type_is_tup_like ( cx : @block_ctxt , t : ty:: t ) -> bool {
865
+ let tcx = bcx_tcx ( cx) ;
866
+ ty:: type_is_tup_like ( tcx, t)
867
+ }
868
+
864
869
//
865
870
// Local Variables:
866
871
// mode: rust
0 commit comments