Skip to content

Commit 0956180

Browse files
author
Cameron Zwarich
committed
---
yaml --- r: 116519 b: refs/heads/snap-stage3 c: 40e3fb4 h: refs/heads/master i: 116517: 99da062 116515: a77a471 116511: 714c719 v: v3
1 parent 5630232 commit 0956180

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
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: 5ccb7644be0f0ab04a76bf88c93cecb63b1ba20d
4+
refs/heads/snap-stage3: 40e3fb4c0b46569b0ab4f5642ed1726915d59e98
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/borrowck/gather_loans/gather_moves.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ pub fn gather_move_from_expr(bccx: &BorrowckCtxt,
4545
move_data: &MoveData,
4646
move_error_collector: &MoveErrorCollector,
4747
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+
};
4954
let move_info = GatherMoveInfo {
5055
id: move_expr_id,
51-
kind: MoveExpr,
56+
kind: kind,
5257
cmt: cmt,
5358
span_path_opt: None,
5459
};

branches/snap-stage3/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ impl<'a> euv::Delegate for GatherLoanCtxt<'a> {
7575
consume_id, cmt.repr(self.tcx()), mode);
7676

7777
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 => { }
8084
}
81-
82-
gather_moves::gather_move_from_expr(
83-
self.bccx, &self.move_data, &self.move_error_collector,
84-
consume_id, cmt);
8585
}
8686

8787
fn consume_pat(&mut self,

0 commit comments

Comments
 (0)