Skip to content

Commit

Permalink
Small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Blei committed Jun 23, 2013
1 parent 8bf0033 commit 273f905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/librustc/middle/trans/type_.rs
Expand Up @@ -189,8 +189,7 @@ impl Type {
None => ()
}

// Bit of a kludge: pick the fn typeref out of the tydesc..
let ty = cx.tydesc_type.get_field(abi::tydesc_field_drop_glue);
let ty = Type::glue_fn(cx.tydesc_type).ptr_to();
cx.tn.associate_type("glue_fn", &ty);

return ty;
Expand Down Expand Up @@ -269,10 +268,6 @@ impl Type {
cx.int_type
}

pub fn captured_tydescs(ctx: &CrateContext, num: uint) -> Type {
Type::struct_(vec::from_elem(num, ctx.tydesc_type.ptr_to()), false)
}

pub fn opaque_trait(ctx: &CrateContext, store: ty::TraitStore) -> Type {
let tydesc_ptr = ctx.tydesc_type.ptr_to();
match store {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/ty.rs
Expand Up @@ -4453,8 +4453,8 @@ pub fn get_tydesc_ty(tcx: ctxt) -> t {
}

pub fn get_opaque_ty(tcx: ctxt) -> t {
let tydesc_lang_item = tcx.lang_items.opaque();
tcx.intrinsic_defs.find_copy(&tydesc_lang_item)
let opaque_lang_item = tcx.lang_items.opaque();
tcx.intrinsic_defs.find_copy(&opaque_lang_item)
.expect("Failed to resolve Opaque")
}

Expand Down

0 comments on commit 273f905

Please sign in to comment.