diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-10-21 17:16:11 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-11-03 04:34:59 -0500 |
| commit | 1e30f3e52be35c8992ae882a38b9c74e6adbfef6 (patch) | |
| tree | bec156dcad96d134bfd325cea66a3245183780cd | |
| parent | 88a9c3e764d7938ecbc9c25e840cb60dbd70d170 (diff) | |
| download | rust-1e30f3e52be35c8992ae882a38b9c74e6adbfef6.tar.gz rust-1e30f3e52be35c8992ae882a38b9c74e6adbfef6.zip | |
Change ShallowDrop to Free, so that it matches what trans will do
| -rw-r--r-- | src/librustc_mir/build/expr/as_rvalue.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/repr.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_mir/build/expr/as_rvalue.rs b/src/librustc_mir/build/expr/as_rvalue.rs index 3cfc51ec3c9..c5831b881ab 100644 --- a/src/librustc_mir/build/expr/as_rvalue.rs +++ b/src/librustc_mir/build/expr/as_rvalue.rs @@ -71,7 +71,7 @@ impl<'a,'tcx> Builder<'a,'tcx> { // 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(); diff --git a/src/librustc_mir/repr.rs b/src/librustc_mir/repr.rs index 09f174e2ba6..54e00dc0a68 100644 --- a/src/librustc_mir/repr.rs +++ b/src/librustc_mir/repr.rs @@ -355,8 +355,8 @@ pub enum StatementKind<'tcx> { #[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> { @@ -364,7 +364,7 @@ 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), } } |
