Skip to content

Commit 2347c4e

Browse files
author
Cameron Zwarich
committed
---
yaml --- r: 152311 b: refs/heads/try2 c: 40e3fb4 h: refs/heads/master i: 152309: e80bea5 152307: ae79319 152303: 2688048 v: v3
1 parent 764f46c commit 2347c4e

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5ccb7644be0f0ab04a76bf88c93cecb63b1ba20d
8+
refs/heads/try2: 40e3fb4c0b46569b0ab4f5642ed1726915d59e98
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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)