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
@ -876,8 +876,10 @@ impl<'a, 'gcx, 'tcx> ParamTy {
|
||||
}
|
||||
|
||||
pub fn is_self(&self) -> bool {
|
||||
if self.name == keywords::SelfType.name().as_str() {
|
||||
assert_eq!(self.idx, 0);
|
||||
// FIXME(#50125): Ignoring `Self` with `idx != 0` might lead to weird behavior elsewhere,
|
||||
// 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
|
||||
} else {
|
||||
false
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
// 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
|
||||
//[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() {
|
||||
if line.contains("error: internal compiler error") {
|
||||
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…
x
Reference in New Issue
Block a user