Skip to content

Commit f83cf6c

Browse files
committed
auto merge of #13967 : richo/rust/features/ICE-fails, r=alexcrichton
This change makes internal compile errors in the compile-fail tests failures. I believe this is the correct behaviour- those tests are intended to assert that the compiler doesn't proceed, not that it explodes. So far, it fails on 4 tests in my environment, my testcase for #13943 which is what caused me to tackle this, and 3 others: ``` failures: [compile-fail] compile-fail/incompatible-tuple.rs # This one is mine and not on master [compile-fail] compile-fail/inherit-struct8.rs [compile-fail] compile-fail/issue-9725.rs [compile-fail] compile-fail/unsupported-cast.rs ```
2 parents ef6daf9 + 201cd9e commit f83cf6c

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/compiletest/runtest.rs

+10
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ fn run_cfail_test(config: &config, props: &TestProps, testfile: &Path) {
8989
} else {
9090
check_error_patterns(props, testfile, &proc_res);
9191
}
92+
check_no_compiler_crash(&proc_res);
9293
}
9394

9495
fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
@@ -505,6 +506,15 @@ fn check_error_patterns(props: &TestProps,
505506
}
506507
}
507508

509+
fn check_no_compiler_crash(proc_res: &ProcRes) {
510+
for line in proc_res.stderr.lines() {
511+
if line.starts_with("error: internal compiler error:") {
512+
fatal_ProcRes("compiler encountered internal error".to_owned(),
513+
proc_res);
514+
}
515+
}
516+
}
517+
508518
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
509519
testfile: &Path,
510520
proc_res: &ProcRes) {

src/test/compile-fail/inherit-struct8.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-test FIXME: #13991
12+
13+
1114
// Test struct inheritance.
1215
#![feature(struct_inherit)]
1316

src/test/compile-fail/issue-9725.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-test FIXME: #13992
12+
1113
struct A { foo: int }
1214

1315
fn main() {

src/test/compile-fail/unsupported-cast.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-test FIXME: #13993
1112
// error-pattern:unsupported cast
1213

1314
extern crate libc;

0 commit comments

Comments
 (0)