File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/librustc/middle/borrowck Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -537,6 +537,28 @@ impl<'a> FlowedMoveData<'a> {
537
537
} )
538
538
}
539
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
+
540
562
pub fn each_move_of ( & self ,
541
563
id : ast:: NodeId ,
542
564
loan_path : & Rc < LoanPath > ,
You can’t perform that action at this time.
0 commit comments