File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
src/test/ui/type-alias-impl-trait Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ // check-pass
2+ // compile-flags: --crate-type=rlib
3+
4+ // Regression test for https://github.com/rust-lang/rust/issues/78450
5+
6+ #![ feature( type_alias_impl_trait) ]
7+ #![ no_std]
8+
9+ pub trait AssociatedImpl {
10+ type ImplTrait ;
11+
12+ fn f ( ) -> Self :: ImplTrait ;
13+ }
14+
15+ struct S < T > ( T ) ;
16+
17+ trait Associated {
18+ type A ;
19+ }
20+
21+ // ICE
22+ impl < ' a , T : Associated < A = & ' a ( ) > > AssociatedImpl for S < T > {
23+ type ImplTrait = impl core:: fmt:: Debug ;
24+
25+ fn f ( ) -> Self :: ImplTrait {
26+ ( )
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ error[E0601]: `main` function not found in crate `associated_type_lifetime_ice`
2+ --> $DIR/associated-type-lifetime-ice.rs:1:1
3+ |
4+ LL | / #![feature(type_alias_impl_trait)]
5+ LL | | #![no_std]
6+ LL | |
7+ LL | | pub trait AssociatedImpl {
8+ ... |
9+ 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
18+
19+ For more information about this error, try `rustc --explain E0601`.
You can’t perform that action at this time.
0 commit comments