Skip to content

Commit d67ffae

Browse files
committed
---
yaml --- r: 94719 b: refs/heads/try c: 026364c h: refs/heads/master i: 94717: fe7c752 94715: 5249456 94711: a84d035 94703: 0ad68cc 94687: 39933b8 94655: 72a5da8 94591: f0830df 94463: 665e1eb 94207: b7dba88 v: v3
1 parent 3d5af16 commit d67ffae

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: fcb47813a4db607ae35e24e8e549d6f849723b5a
5+
refs/heads/try: 026364ca26a35f0d710d9b7d6501d267f8f82684
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/borrowck/move_data.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,18 @@ impl MoveData {
193193
self.paths[*index].next_sibling
194194
}
195195

196-
fn mut_path<'a>(&'a mut self, index: MovePathIndex) -> &'a mut MovePath {
197-
//! Type safe indexing operator
198-
&mut self.paths[*index]
196+
fn set_path_first_move(&mut self,
197+
index: MovePathIndex,
198+
first_move: MoveIndex) {
199+
self.paths[*index].first_move = first_move
200+
}
201+
202+
fn set_path_first_child(&mut self,
203+
index: MovePathIndex,
204+
first_child: MovePathIndex) {
205+
self.paths[*index].first_child = first_child
199206
}
207+
200208

201209
fn move<'a>(&'a self, index: MoveIndex) -> &'a Move {
202210
//! Type safe indexing operator
@@ -244,7 +252,7 @@ impl MoveData {
244252
let index = MovePathIndex(self.paths.len());
245253

246254
let next_sibling = self.path_first_child(parent_index);
247-
self.mut_path(parent_index).first_child = index;
255+
self.set_path_first_child(parent_index, index);
248256

249257
self.paths.push(MovePath {
250258
loan_path: lp,
@@ -327,7 +335,7 @@ impl MoveData {
327335
let move_index = MoveIndex(self.moves.len());
328336

329337
let next_move = self.path_first_move(path_index);
330-
self.mut_path(path_index).first_move = move_index;
338+
self.set_path_first_move(path_index, move_index);
331339

332340
self.moves.push(Move {
333341
path: path_index,

0 commit comments

Comments
 (0)