-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler crashes when using feature "associated_type_defaults" #37051
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
|
Just came across the same problem. I have a tinier example to reproduce if you want to: #![feature(associated_type_defaults)]
trait Foo {
type Args = ();
fn foo(&mut self, name: &str, args: Option<Self::Args>);
}
impl Foo for bool {
fn foo(&mut self, name: &str, args: Option<Self::Args>) {}
} Weird stuff: if you replace the |
Similar issue here with 1.13 stable. It is somewhat related to not explicitly defining the
Would raise the issue. Uncommentting line 2 fixes it. I do not know why the compiler is not allowed to infer what |
I've ran into this without using |
Examples here no longer ICE. E-needstest. |
None of the examples crash on the latest nightly. Feel free to close this issue if you think the issue was fixed. |
Yes, we plan on closing this as soon as a test can be written for this so we don't regress here in the future. |
Add tests for a few issues. Fixes rust-lang#41998 Fixes rust-lang#38381 Fixes rust-lang#37515 Fixes rust-lang#37510 Fixes rust-lang#37508 Fixes rust-lang#37366 Fixes rust-lang#37323 Fixes rust-lang#37051 Fixes rust-lang#36839 Fixes rust-lang#35570 Fixes rust-lang#34373 Fixes rust-lang#34222 Certainly not all of the E-needstest issues right now, but I started to get bored.
rustc:
rustc 1.14.0-nightly (6e8f92f11 2016-10-07)
cargo:
cargo 0.13.0-nightly (6534bdd 2016-10-07)
Short code example to reproduce the issue:
Adding
type NextState = StateMachineEnded;
to the implementation - will compile.RUST_LOG=trace RUST_BACKTRACE=1 cargo build
log: https://gist.github.com/lilianmoraru/69701f72b626f9872661952190066b37The text was updated successfully, but these errors were encountered: