We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40e3fb4 commit 78934b0Copy full SHA for 78934b0
src/librustc/middle/borrowck/move_data.rs
@@ -537,6 +537,28 @@ impl<'a> FlowedMoveData<'a> {
537
})
538
}
539
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
562
pub fn each_move_of(&self,
563
id: ast::NodeId,
564
loan_path: &Rc<LoanPath>,
0 commit comments