Skip to content

Commit 2c4c45a

Browse files
committed
---
yaml --- r: 147670 b: refs/heads/try2 c: fcb4781 h: refs/heads/master v: v3
1 parent b168e55 commit 2c4c45a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
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: f700cf38724a4a9ab31850cf6a5b11c6dbe0524f
8+
refs/heads/try2: fcb47813a4db607ae35e24e8e549d6f849723b5a
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/move_data.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,12 @@ impl MoveData {
185185
self.paths[*index].first_move
186186
}
187187

188-
fn path<'a>(&'a self, index: MovePathIndex) -> &'a MovePath {
189-
//! Type safe indexing operator
190-
&self.paths[*index]
188+
fn path_first_child(&self, index: MovePathIndex) -> MovePathIndex {
189+
self.paths[*index].first_child
190+
}
191+
192+
fn path_next_sibling(&self, index: MovePathIndex) -> MovePathIndex {
193+
self.paths[*index].next_sibling
191194
}
192195

193196
fn mut_path<'a>(&'a mut self, index: MovePathIndex) -> &'a mut MovePath {
@@ -443,12 +446,12 @@ impl MoveData {
443446
return false;
444447
}
445448

446-
let mut p = self.path(index).first_child;
449+
let mut p = self.path_first_child(index);
447450
while p != InvalidMovePathIndex {
448451
if !self.each_extending_path(p, |x| f(x)) {
449452
return false;
450453
}
451-
p = self.path(p).next_sibling;
454+
p = self.path_next_sibling(p);
452455
}
453456

454457
return true;

0 commit comments

Comments
 (0)