Fix ICE with feature self_struct_ctor

This commit is contained in:
Esteban Küber 2018-11-24 17:12:28 -08:00 committed by Alexander Regueiro
parent 3e90a12a8a
commit c144dc07e3
3 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#![feature(self_struct_ctor)]
trait FooTrait {}
trait BarTrait {
fn foo<T: FooTrait>(_: T) -> Self;
}
struct FooStruct(u32);
impl BarTrait for FooStruct {
fn foo<T: FooTrait>(_: T) -> Self {
Self(u32::default())
}
}

View file

@ -0,0 +1,7 @@
error[E0601]: `main` function not found in crate `issue_56202`
|
= note: consider adding a `main` function to `$DIR/issue-56202.rs`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0601`.