--- /dev/null
+// 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 {
+ ()
+ }
+}
--- /dev/null
+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`.