Skip to content

Commit cd7a9b7

Browse files
committed
Remove arms_have_move_bindings
1 parent 55201ed commit cd7a9b7

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/librustc/middle/moves.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,6 @@ impl VisitContext {
459459
}
460460

461461
ExprMatch(discr, ref arms) => {
462-
// We must do this first so that `arms_have_by_move_bindings`
463-
// below knows which bindings are moves.
464462
for arm in arms.iter() {
465463
self.consume_arm(arm);
466464
}
@@ -657,27 +655,6 @@ impl VisitContext {
657655
self.consume_expr(arg_expr)
658656
}
659657

660-
pub fn arms_have_by_move_bindings(&mut self,
661-
moves_map: MovesMap,
662-
arms: &[Arm])
663-
-> Option<@Pat> {
664-
let mut ret = None;
665-
for arm in arms.iter() {
666-
for &pat in arm.pats.iter() {
667-
let cont = do ast_util::walk_pat(pat) |p| {
668-
if moves_map.contains(&p.id) {
669-
ret = Some(p);
670-
false
671-
} else {
672-
true
673-
}
674-
};
675-
if !cont { return ret }
676-
}
677-
}
678-
ret
679-
}
680-
681658
pub fn compute_captures(&mut self, fn_expr_id: NodeId) -> @[CaptureVar] {
682659
debug!("compute_capture_vars(fn_expr_id={:?})", fn_expr_id);
683660
let _indenter = indenter();

0 commit comments

Comments
 (0)