Correctly generate drop glue for Box<str>

This fixes an ICE.  Closes issue #17734
This commit is contained in:
Brian Koropoff 2014-10-03 23:00:20 -07:00
parent 908c9e6a1b
commit 1f7a8bcb4b

View File

@ -429,7 +429,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, t: ty::t)
tvec::make_drop_glue_unboxed(bcx, v0, ty, true)
}
ty::ty_str => {
let unit_ty = ty::sequence_element_type(bcx.tcx(), t);
let unit_ty = ty::sequence_element_type(bcx.tcx(), content_ty);
tvec::make_drop_glue_unboxed(bcx, v0, unit_ty, true)
}
ty::ty_trait(..) => {