@@ -324,7 +324,6 @@ fn trans_struct_drop_flag<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
324
324
325
325
pub fn get_res_dtor < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
326
326
did : ast:: DefId ,
327
- t : Ty < ' tcx > ,
328
327
parent_id : ast:: DefId ,
329
328
substs : & Substs < ' tcx > )
330
329
-> ValueRef {
@@ -347,11 +346,8 @@ pub fn get_res_dtor<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
347
346
let name = csearch:: get_symbol ( & ccx. sess ( ) . cstore , did) ;
348
347
let class_ty = tcx. lookup_item_type ( parent_id) . ty . subst ( tcx, substs) ;
349
348
let llty = type_of_dtor ( ccx, class_ty) ;
350
- let dtor_ty = ccx. tcx ( ) . mk_ctor_fn ( did,
351
- & [ get_drop_glue_type ( ccx, t) ] ,
352
- ccx. tcx ( ) . mk_nil ( ) ) ;
353
349
foreign:: get_extern_fn ( ccx, & mut * ccx. externs ( ) . borrow_mut ( ) , & name[ ..] , llvm:: CCallConv ,
354
- llty, dtor_ty )
350
+ llty, ccx . tcx ( ) . mk_nil ( ) )
355
351
}
356
352
}
357
353
@@ -366,7 +362,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
366
362
debug ! ( "trans_struct_drop t: {}" , t) ;
367
363
368
364
// Find and call the actual destructor
369
- let dtor_addr = get_res_dtor ( bcx. ccx ( ) , dtor_did, t , class_did, substs) ;
365
+ let dtor_addr = get_res_dtor ( bcx. ccx ( ) , dtor_did, class_did, substs) ;
370
366
371
367
// Class dtors have no explicit args, so the params should
372
368
// just consist of the environment (self).
0 commit comments