forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#56205 - estebank:ice-ice-baby, r=nikomatsakis
Fix ICE with feature self_struct_ctor Fix rust-lang#56202.
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |