rustc: Remove tuplify_cbox_ty. Unused

This commit is contained in:
Brian Anderson 2012-05-08 16:30:00 -07:00
parent 02dde781eb
commit 6d37c90ce6
2 changed files with 2 additions and 9 deletions

View File

@ -116,7 +116,7 @@ fn ev_to_str(ccx: @crate_ctxt, ev: environment_value) -> str {
}
fn mk_tuplified_uniq_cbox_ty(tcx: ty::ctxt, cdata_ty: ty::t) -> ty::t {
let cbox_ty = tuplify_cbox_ty(tcx, cdata_ty, ty::mk_type(tcx));
let cbox_ty = tuplify_box_ty(tcx, cdata_ty);
ret ty::mk_imm_uniq(tcx, cbox_ty);
}

View File

@ -654,15 +654,8 @@ fn T_opaque_vec(targ_cfg: @session::config) -> TypeRef {
// representation of @T as a tuple (i.e., the ty::t version of what T_box()
// returns).
fn tuplify_box_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
ret tuplify_cbox_ty(tcx, t, ty::mk_type(tcx));
}
// As tuplify_box_ty(), but allows the caller to specify what type of type
// descr is embedded in the box (ty::type vs ty::send_type). This is useful
// for unique closure boxes, hence the name "cbox_ty" (closure box type).
fn tuplify_cbox_ty(tcx: ty::ctxt, t: ty::t, tydesc_t: ty::t) -> ty::t {
let ptr = ty::mk_ptr(tcx, {ty: ty::mk_nil(tcx), mutbl: ast::m_imm});
ret ty::mk_tup(tcx, [ty::mk_uint(tcx), tydesc_t,
ret ty::mk_tup(tcx, [ty::mk_uint(tcx), ty::mk_type(tcx),
ptr, ptr,
t]);
}