// schedule a shallow free of that memory, lest we unwind:
let extent = this.extent_of_innermost_scope().unwrap();
- this.schedule_drop(expr_span, extent, DropKind::Shallow, &result, value_ty);
+ this.schedule_drop(expr_span, extent, DropKind::Free, &result, value_ty);
// initialize the box contents:
let contents = result.clone().deref();
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum DropKind {
- Shallow,
- Deep,
+ Free, // free a partially constructed box, should go away eventually
+ Deep
}
impl<'tcx> Debug for Statement<'tcx> {
use self::StatementKind::*;
match self.kind {
Assign(ref lv, ref rv) => write!(fmt, "{:?} = {:?}", lv, rv),
- Drop(DropKind::Shallow, ref lv) => write!(fmt, "shallow_drop {:?}", lv),
+ Drop(DropKind::Free, ref lv) => write!(fmt, "free {:?}", lv),
Drop(DropKind::Deep, ref lv) => write!(fmt, "drop {:?}", lv),
}
}