Skip to content

Commit 517abbe

Browse files
author
Cameron Zwarich
committed
---
yaml --- r: 116520 b: refs/heads/snap-stage3 c: 78934b0 h: refs/heads/master v: v3
1 parent 0956180 commit 517abbe

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: bee4e6adac17f87b1cdc26ab69f8c0f5d82575a3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 40e3fb4c0b46569b0ab4f5642ed1726915d59e98
4+
refs/heads/snap-stage3: 78934b03e39af86e60bdafcfe186b0f88c5b192e
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/borrowck/move_data.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,28 @@ impl<'a> FlowedMoveData<'a> {
537537
})
538538
}
539539

540+
pub fn kind_of_move_of_path(&self,
541+
id: ast::NodeId,
542+
loan_path: &Rc<LoanPath>)
543+
-> Option<MoveKind> {
544+
//! Returns the kind of a move of `loan_path` by `id`, if one exists.
545+
546+
let mut ret = None;
547+
for loan_path_index in self.move_data.path_map.borrow().find(&*loan_path).iter() {
548+
self.dfcx_moves.each_gen_bit_frozen(id, |move_index| {
549+
let move = self.move_data.moves.borrow();
550+
let move = move.get(move_index);
551+
if move.path == **loan_path_index {
552+
ret = Some(move.kind);
553+
false
554+
} else {
555+
true
556+
}
557+
});
558+
}
559+
ret
560+
}
561+
540562
pub fn each_move_of(&self,
541563
id: ast::NodeId,
542564
loan_path: &Rc<LoanPath>,

0 commit comments

Comments
 (0)