about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2013-11-25 23:36:20 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2013-11-25 23:36:20 +0900
commitcd7a9b723484115d447f68729f5074ea7cae409c (patch)
tree415025d84ab2e0dd29a8e5be4e1101ef46a96b08
parent55201ed858fa42112bd36aa5bdf72fb070173530 (diff)
downloadrust-cd7a9b723484115d447f68729f5074ea7cae409c.tar.gz
rust-cd7a9b723484115d447f68729f5074ea7cae409c.zip
Remove arms_have_move_bindings
-rw-r--r--src/librustc/middle/moves.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/librustc/middle/moves.rs b/src/librustc/middle/moves.rs
index 8493a7e00dd..9e84b32ae8f 100644
--- a/src/librustc/middle/moves.rs
+++ b/src/librustc/middle/moves.rs
@@ -459,8 +459,6 @@ impl VisitContext {
             }
 
             ExprMatch(discr, ref arms) => {
-                // We must do this first so that `arms_have_by_move_bindings`
-                // below knows which bindings are moves.
                 for arm in arms.iter() {
                     self.consume_arm(arm);
                 }
@@ -657,27 +655,6 @@ impl VisitContext {
         self.consume_expr(arg_expr)
     }
 
-    pub fn arms_have_by_move_bindings(&mut self,
-                                      moves_map: MovesMap,
-                                      arms: &[Arm])
-                                      -> Option<@Pat> {
-        let mut ret = None;
-        for arm in arms.iter() {
-            for &pat in arm.pats.iter() {
-                let cont = do ast_util::walk_pat(pat) |p| {
-                    if moves_map.contains(&p.id) {
-                        ret = Some(p);
-                        false
-                    } else {
-                        true
-                    }
-                };
-                if !cont { return ret }
-            }
-        }
-        ret
-    }
-
     pub fn compute_captures(&mut self, fn_expr_id: NodeId) -> @[CaptureVar] {
         debug!("compute_capture_vars(fn_expr_id={:?})", fn_expr_id);
         let _indenter = indenter();