Skip to content

Commit aa48a17

Browse files
committed
dataflow: fix flow of information through pattern variants
1 parent a896440 commit aa48a17

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc/middle/dataflow.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,9 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
846846
// alternatives, so we must treat this like an N-way select
847847
// statement.
848848
let initial_state = reslice(in_out).to_vec();
849-
self.reset(in_out);
850849
for pats.each |&pat| {
851850
let mut temp = copy initial_state;
852-
self.walk_pat(pat, in_out, loop_scopes);
851+
self.walk_pat(pat, temp, loop_scopes);
853852
join_bits(&self.dfcx.oper, temp, in_out);
854853
}
855854
}

0 commit comments

Comments
 (0)