]> git.lizzy.rs Git - rust.git/commitdiff
rename variables to match new type name
authorRalf Jung <post@ralfj.de>
Mon, 4 Sep 2017 10:13:05 +0000 (12:13 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 4 Sep 2017 10:13:05 +0000 (12:13 +0200)
src/librustc_mir/interpret/validation.rs

index d40a2eb83a511eefa0ceef79032765d3222472de..7dfc781520cde0e8ce782a349f5b3ce65e2ca58f 100644 (file)
@@ -89,34 +89,34 @@ pub(crate) fn validation_op(
         let mode = match op {
             ValidationOp::Acquire => ValidationMode::Acquire,
             ValidationOp::Release => ValidationMode::ReleaseUntil(None),
-            ValidationOp::Suspend(ce) => {
+            ValidationOp::Suspend(scope) => {
                 if query.mutbl == MutMutable {
                     let lft = DynamicLifetime {
                         frame: self.cur_frame(),
-                        region: Some(ce),
+                        region: Some(scope),
                     };
-                    trace!("Suspending {:?} until {:?}", query, ce);
+                    trace!("Suspending {:?} until {:?}", query, scope);
                     self.suspended.entry(lft).or_insert_with(Vec::new).push(
                         query.clone(),
                     );
                 }
-                ValidationMode::ReleaseUntil(Some(ce))
+                ValidationMode::ReleaseUntil(Some(scope))
             }
         };
         self.validate(query, mode)
     }
 
-    pub(crate) fn end_region(&mut self, ce: region::Scope) -> EvalResult<'tcx> {
-        self.memory.locks_lifetime_ended(Some(ce));
+    pub(crate) fn end_region(&mut self, scope: region::Scope) -> EvalResult<'tcx> {
+        self.memory.locks_lifetime_ended(Some(scope));
         // Recover suspended lvals
         let lft = DynamicLifetime {
             frame: self.cur_frame(),
-            region: Some(ce),
+            region: Some(scope),
         };
         if let Some(queries) = self.suspended.remove(&lft) {
             for query in queries {
                 trace!("Recovering {:?} from suspension", query);
-                self.validate(query, ValidationMode::Recover(ce))?;
+                self.validate(query, ValidationMode::Recover(scope))?;
             }
         }
         Ok(())
@@ -459,7 +459,7 @@ fn try_validate(
                 // we record the region of this borrow to the context.
                 if query.re == None {
                     match *region {
-                        ReScope(ce) => query.re = Some(ce),
+                        ReScope(scope) => query.re = Some(scope),
                         // It is possible for us to encounter erased lifetimes here because the lifetimes in
                         // this functions' Subst will be erased.
                         _ => {}