Auto merge of #49891 - cuviper:compiletest-crash, r=alexcrichton
compiletest: detect non-ICE compiler panics Fixes #49888, but will be blocked by revealing #49889.
This commit is contained in:
commit
9822b5709c
3 changed files with 7 additions and 3 deletions
|
@ -876,8 +876,10 @@ impl<'a, 'gcx, 'tcx> ParamTy {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_self(&self) -> bool {
|
pub fn is_self(&self) -> bool {
|
||||||
if self.name == keywords::SelfType.name().as_str() {
|
// FIXME(#50125): Ignoring `Self` with `idx != 0` might lead to weird behavior elsewhere,
|
||||||
assert_eq!(self.idx, 0);
|
// but this should only be possible when using `-Z continue-parse-after-error` like
|
||||||
|
// `compile-fail/issue-36638.rs`.
|
||||||
|
if self.name == keywords::SelfType.name().as_str() && self.idx == 0 {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// revisions: nll_beyond nll_target
|
// revisions: nll_target
|
||||||
|
|
||||||
// The following revisions are disabled due to missing support from two-phase beyond autorefs
|
// The following revisions are disabled due to missing support from two-phase beyond autorefs
|
||||||
//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two-phase-beyond-autoref
|
//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two-phase-beyond-autoref
|
||||||
|
|
|
@ -1168,6 +1168,8 @@ impl<'test> TestCx<'test> {
|
||||||
for line in proc_res.stderr.lines() {
|
for line in proc_res.stderr.lines() {
|
||||||
if line.contains("error: internal compiler error") {
|
if line.contains("error: internal compiler error") {
|
||||||
self.fatal_proc_rec("compiler encountered internal error", proc_res);
|
self.fatal_proc_rec("compiler encountered internal error", proc_res);
|
||||||
|
} else if line.contains(" panicked at ") {
|
||||||
|
self.fatal_proc_rec("compiler panicked", proc_res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue