Skip to content

Commit 273f905

Browse files
committed
Small cleanups
1 parent 8bf0033 commit 273f905

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/librustc/middle/trans/type_.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ impl Type {
189189
None => ()
190190
}
191191

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

196195
return ty;
@@ -269,10 +268,6 @@ impl Type {
269268
cx.int_type
270269
}
271270

272-
pub fn captured_tydescs(ctx: &CrateContext, num: uint) -> Type {
273-
Type::struct_(vec::from_elem(num, ctx.tydesc_type.ptr_to()), false)
274-
}
275-
276271
pub fn opaque_trait(ctx: &CrateContext, store: ty::TraitStore) -> Type {
277272
let tydesc_ptr = ctx.tydesc_type.ptr_to();
278273
match store {

src/librustc/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4453,8 +4453,8 @@ pub fn get_tydesc_ty(tcx: ctxt) -> t {
44534453
}
44544454

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

0 commit comments

Comments
 (0)