summaryrefslogtreecommitdiffstats
path: root/src/librustc_mir/interpret/step.rs
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2018-03-23 12:44:33 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2018-03-23 12:44:33 +0100
commitf9019aee5bc2f84b69771dc4e2e0cfad5e053566 (patch)
tree34d64b9867597af2cd78e490d01bfc379dc0cb2e /src/librustc_mir/interpret/step.rs
parentDon't allocate a local array at all if there are no locals (diff)
downloadgrust-f9019aee5bc2f84b69771dc4e2e0cfad5e053566.tar.gz
grust-f9019aee5bc2f84b69771dc4e2e0cfad5e053566.tar.bz2
grust-f9019aee5bc2f84b69771dc4e2e0cfad5e053566.tar.xz
Simplify local accessors
Diffstat (limited to 'src/librustc_mir/interpret/step.rs')
-rw-r--r--src/librustc_mir/interpret/step.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/interpret/step.rs b/src/librustc_mir/interpret/step.rs
index 4e1750caf2..752c94dec2 100644
--- a/src/librustc_mir/interpret/step.rs
+++ b/src/librustc_mir/interpret/step.rs
@@ -69,13 +69,13 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
69 69
70 // Mark locals as alive 70 // Mark locals as alive
71 StorageLive(local) => { 71 StorageLive(local) => {
72 let old_val = self.frame_mut().storage_live(local)?; 72 let old_val = self.frame_mut().storage_live(local);
73 self.deallocate_local(old_val)?; 73 self.deallocate_local(old_val)?;
74 } 74 }
75 75
76 // Mark locals as dead 76 // Mark locals as dead
77 StorageDead(local) => { 77 StorageDead(local) => {
78 let old_val = self.frame_mut().storage_dead(local)?; 78 let old_val = self.frame_mut().storage_dead(local);
79 self.deallocate_local(old_val)?; 79 self.deallocate_local(old_val)?;
80 } 80 }
81 81