Skip to content

Commit e4c141a

Browse files
committed
Fix bug in generation of non-generic resource dtors
Issue #1944
1 parent 7631428 commit e4c141a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ fn make_drop_glue(bcx: block, v0: ValueRef, t: ty::t) {
692692
fn get_res_dtor(ccx: @crate_ctxt, did: ast::def_id, substs: [ty::t])
693693
-> ValueRef {
694694
let _icx = ccx.insn_ctxt("trans_res_dtor");
695-
let did = if did.crate != ast::local_crate && substs.len() > 0u {
695+
let did = if did.crate != ast::local_crate {
696696
maybe_instantiate_inline(ccx, did)
697697
} else { did };
698698
assert did.crate == ast::local_crate;

0 commit comments

Comments
 (0)