]> git.lizzy.rs Git - rust.git/commitdiff
Use trailing underscore for helper methods
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Thu, 16 Jan 2020 02:41:17 +0000 (18:41 -0800)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Thu, 16 Jan 2020 02:41:17 +0000 (18:41 -0800)
src/librustc_mir/dataflow/generic/cursor.rs

index f819b0fb5d69a974ef851023a8abb817f3dda070..d2eff494ad701b4b963d64288c9bbe46f91603bf 100644 (file)
@@ -79,7 +79,7 @@ pub fn seek_to_block_start(&mut self, block: BasicBlock) {
     /// effect, use `seek_after` or `seek_after_assume_call_returns`.
     pub fn seek_before(&mut self, target: Location) {
         assert!(target <= self.body.terminator_loc(target.block));
-        self._seek(target, false);
+        self.seek_(target, false);
     }
 
     /// Advances the cursor to hold the full effect of all statements (and possibly closing
@@ -98,7 +98,7 @@ pub fn seek_after(&mut self, target: Location) {
             self.seek_to_block_start(target.block);
         }
 
-        self._seek(target, true);
+        self.seek_(target, true);
     }
 
     /// Advances the cursor to hold all effects up to and including of the statement (or
@@ -110,7 +110,7 @@ pub fn seek_after_assume_call_returns(&mut self, target: Location) {
         let terminator_loc = self.body.terminator_loc(target.block);
         assert!(target.statement_index <= terminator_loc.statement_index);
 
-        self._seek(target, true);
+        self.seek_(target, true);
 
         if target != terminator_loc {
             return;
@@ -134,7 +134,7 @@ pub fn seek_after_assume_call_returns(&mut self, target: Location) {
         }
     }
 
-    fn _seek(&mut self, target: Location, apply_after_effect_at_target: bool) {
+    fn seek_(&mut self, target: Location, apply_after_effect_at_target: bool) {
         use CursorPosition::*;
 
         match self.pos {