Skip to content

Commit 80b1d72

Browse files
committed
---
yaml --- r: 190268 b: refs/heads/tmp c: 9eed8ea h: refs/heads/master v: v3
1 parent 16dfe39 commit 80b1d72

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 3a8f989dbb7df27f78874d5afbc579cb420159d2
37+
refs/heads/tmp: 9eed8ea644c18e81079be240684b41dd0cf00b02
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf

branches/tmp/src/librustc_trans/trans/tvec.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,12 @@ pub fn iter_vec_loop<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
410410
F: FnOnce(Block<'blk, 'tcx>, ValueRef, Ty<'tcx>) -> Block<'blk, 'tcx>,
411411
{
412412
let _icx = push_ctxt("tvec::iter_vec_loop");
413-
let fcx = bcx.fcx;
414413

414+
if bcx.unreachable.get() {
415+
return bcx;
416+
}
417+
418+
let fcx = bcx.fcx;
415419
let loop_bcx = fcx.new_temp_block("expr_repeat");
416420
let next_bcx = fcx.new_temp_block("expr_repeat: next");
417421

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// error-pattern:panic evaluated
12+
13+
#[allow(unused_variables)]
14+
fn main() {
15+
// This used to trigger an LLVM assertion during compilation
16+
let x = [panic!("panic evaluated"); 2];
17+
}

0 commit comments

Comments
 (0)