Add reproduction test
This commit is contained in:
parent
7a7bbdb3ab
commit
327cc62b0d
2 changed files with 47 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
// check-pass
|
||||
// compile-flags: --crate-type=rlib
|
||||
|
||||
// Regression test for https://github.com/rust-lang/rust/issues/78450
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![no_std]
|
||||
|
||||
pub trait AssociatedImpl {
|
||||
type ImplTrait;
|
||||
|
||||
fn f() -> Self::ImplTrait;
|
||||
}
|
||||
|
||||
struct S<T>(T);
|
||||
|
||||
trait Associated {
|
||||
type A;
|
||||
}
|
||||
|
||||
// ICE
|
||||
impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
|
||||
type ImplTrait = impl core::fmt::Debug;
|
||||
|
||||
fn f() -> Self::ImplTrait {
|
||||
()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
error[E0601]: `main` function not found in crate `associated_type_lifetime_ice`
|
||||
--> $DIR/associated-type-lifetime-ice.rs:1:1
|
||||
|
|
||||
LL | / #![feature(type_alias_impl_trait)]
|
||||
LL | | #![no_std]
|
||||
LL | |
|
||||
LL | | pub trait AssociatedImpl {
|
||||
... |
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_^ consider adding a `main` function to `$DIR/associated-type-lifetime-ice.rs`
|
||||
|
||||
error: language item required, but not found: `eh_personality`
|
||||
|
||||
error: `#[panic_handler]` function required, but not found
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
Loading…
Add table
Reference in a new issue