Skip to content

Commit aae7200

Browse files
committed
---
yaml --- r: 165409 b: refs/heads/master c: 5722410 h: refs/heads/master i: 165407: a8b3566 v: v3
1 parent 1715b59 commit aae7200

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b4f54f96df60337cb939f6f753a1cc6181e70f4b
2+
refs/heads/master: 5722410f72d0698f6ad9ba668e2282ff0bac5043
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
55
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b

trunk/src/librustc/middle/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pub struct DepthFirstTraversal<'g, N:'g, E:'g> {
314314
impl<'g, N, E> Iterator<&'g N> for DepthFirstTraversal<'g, N, E> {
315315
fn next(&mut self) -> Option<&'g N> {
316316
while let Some(idx) = self.stack.pop() {
317-
if self.visited.insert(idx.node_id()) {
317+
if !self.visited.insert(idx.node_id()) {
318318
continue;
319319
}
320320
self.graph.each_outgoing_edge(idx, |_, e| -> bool {

trunk/src/librustc_trans/trans/expr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,10 @@ fn trans_rvalue_stmt_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
945945
if let &Some(ref x) = ex {
946946
bcx = trans_into(bcx, &**x, Ignore);
947947
}
948+
// Mark the end of the block as unreachable. Once we get to
949+
// a return expression, there's no more we should be doing
950+
// after this.
951+
Unreachable(bcx);
948952
bcx
949953
}
950954
}

0 commit comments

Comments
 (0)