about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_trans/tvec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_trans/tvec.rs b/src/librustc_trans/tvec.rs
index c693a5ceabe..07928964873 100644
--- a/src/librustc_trans/tvec.rs
+++ b/src/librustc_trans/tvec.rs
@@ -47,7 +47,7 @@ pub fn slice_for_each<'a, 'tcx, F>(
 
     f(&body_bcx, if zst { data_ptr } else { current });
     let next = add(&body_bcx, current, C_uint(bcx.ccx(), 1usize));
-    body_bcx.add_incoming_to_phi(current, next, body_bcx.llbb());
+    header_bcx.add_incoming_to_phi(current, next, body_bcx.llbb());
     body_bcx.br(header_bcx.llbb());
     next_bcx
 }