File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
branches/try2/src/librustc/middle/borrowck/gather_loans Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 5ccb7644be0f0ab04a76bf88c93cecb63b1ba20d
8
+ refs/heads/try2: 40e3fb4c0b46569b0ab4f5642ed1726915d59e98
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -45,10 +45,15 @@ pub fn gather_move_from_expr(bccx: &BorrowckCtxt,
45
45
move_data : & MoveData ,
46
46
move_error_collector : & MoveErrorCollector ,
47
47
move_expr_id : ast:: NodeId ,
48
- cmt : mc:: cmt ) {
48
+ cmt : mc:: cmt ,
49
+ move_reason : euv:: MoveReason ) {
50
+ let kind = match move_reason {
51
+ euv:: DirectRefMove | euv:: PatBindingMove => MoveExpr ,
52
+ euv:: CaptureMove => Captured
53
+ } ;
49
54
let move_info = GatherMoveInfo {
50
55
id : move_expr_id,
51
- kind : MoveExpr ,
56
+ kind : kind ,
52
57
cmt : cmt,
53
58
span_path_opt : None ,
54
59
} ;
Original file line number Diff line number Diff line change @@ -75,13 +75,13 @@ impl<'a> euv::Delegate for GatherLoanCtxt<'a> {
75
75
consume_id, cmt. repr( self . tcx( ) ) , mode) ;
76
76
77
77
match mode {
78
- euv:: Copy => { return ; }
79
- euv:: Move ( _) => { }
78
+ euv:: Move ( move_reason) => {
79
+ gather_moves:: gather_move_from_expr (
80
+ self . bccx , & self . move_data , & self . move_error_collector ,
81
+ consume_id, cmt, move_reason) ;
82
+ }
83
+ euv:: Copy => { }
80
84
}
81
-
82
- gather_moves:: gather_move_from_expr (
83
- self . bccx , & self . move_data , & self . move_error_collector ,
84
- consume_id, cmt) ;
85
85
}
86
86
87
87
fn consume_pat ( & mut self ,
You can’t perform that action at this time.
0 commit comments