Skip to content

Commit 5553301

Browse files
committed
Make regression test succeed as long as it ICEs
1 parent f261a82 commit 5553301

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

src/test/ui/type-alias-impl-trait/associated-type-lifetime-ice.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// check-pass
1+
// failure-status: 101
2+
// rustc-env:RUST_BACKTRACE=0
3+
// normalize-stderr-test "note: .*\n\n" -> ""
4+
// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
5+
26
// compile-flags: --crate-type=rlib
37

48
// Regression test for https://github.com/rust-lang/rust/issues/78450
@@ -22,7 +26,7 @@ trait Associated {
2226
impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
2327
type ImplTrait = impl core::fmt::Debug;
2428

25-
fn f() -> Self::ImplTrait {
29+
fn f() -> Self::ImplTrait { //~ ERROR unexpected concrete region in borrowck: ReEarlyBound(0, 'a)
2630
()
2731
}
2832
}
Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
error[E0601]: `main` function not found in crate `associated_type_lifetime_ice`
2-
--> $DIR/associated-type-lifetime-ice.rs:1:1
1+
error: internal compiler error: unexpected concrete region in borrowck: ReEarlyBound(0, 'a)
2+
--> $DIR/associated-type-lifetime-ice.rs:29:5
33
|
4-
LL | / #![feature(type_alias_impl_trait)]
5-
LL | | #![no_std]
6-
LL | |
7-
LL | | pub trait AssociatedImpl {
8-
... |
4+
LL | / fn f() -> Self::ImplTrait {
5+
LL | | ()
96
LL | | }
10-
LL | | }
11-
| |_^ consider adding a `main` function to `$DIR/associated-type-lifetime-ice.rs`
12-
13-
error: language item required, but not found: `eh_personality`
14-
15-
error: `#[panic_handler]` function required, but not found
16-
17-
error: aborting due to 3 previous errors
7+
| |_____^
8+
|
9+
= error: internal compiler error: unexpected panic
1810

19-
For more information about this error, try `rustc --explain E0601`.
11+
query stack during panic:
12+
end of query stack

0 commit comments

Comments
 (0)