Small cleanups
This commit is contained in:
parent
8bf0033345
commit
273f90566c
@ -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;
|
||||
@ -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 {
|
||||
|
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user