Skip to content

Commit 6d37c90

Browse files
committed
rustc: Remove tuplify_cbox_ty. Unused
1 parent 02dde78 commit 6d37c90

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/rustc/middle/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fn ev_to_str(ccx: @crate_ctxt, ev: environment_value) -> str {
116116
}
117117

118118
fn mk_tuplified_uniq_cbox_ty(tcx: ty::ctxt, cdata_ty: ty::t) -> ty::t {
119-
let cbox_ty = tuplify_cbox_ty(tcx, cdata_ty, ty::mk_type(tcx));
119+
let cbox_ty = tuplify_box_ty(tcx, cdata_ty);
120120
ret ty::mk_imm_uniq(tcx, cbox_ty);
121121
}
122122

src/rustc/middle/trans/common.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -654,15 +654,8 @@ fn T_opaque_vec(targ_cfg: @session::config) -> TypeRef {
654654
// representation of @T as a tuple (i.e., the ty::t version of what T_box()
655655
// returns).
656656
fn tuplify_box_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
657-
ret tuplify_cbox_ty(tcx, t, ty::mk_type(tcx));
658-
}
659-
660-
// As tuplify_box_ty(), but allows the caller to specify what type of type
661-
// descr is embedded in the box (ty::type vs ty::send_type). This is useful
662-
// for unique closure boxes, hence the name "cbox_ty" (closure box type).
663-
fn tuplify_cbox_ty(tcx: ty::ctxt, t: ty::t, tydesc_t: ty::t) -> ty::t {
664657
let ptr = ty::mk_ptr(tcx, {ty: ty::mk_nil(tcx), mutbl: ast::m_imm});
665-
ret ty::mk_tup(tcx, [ty::mk_uint(tcx), tydesc_t,
658+
ret ty::mk_tup(tcx, [ty::mk_uint(tcx), ty::mk_type(tcx),
666659
ptr, ptr,
667660
t]);
668661
}

0 commit comments

Comments
 (0)