-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE on stable and nightly: compiler/rustc_trait_selection/src/traits/select/mod.rs:2013:17 #91594
Comments
Minimized: (play) trait Component<M> {
type Interface;
}
trait HasComponent<I> {}
struct Foo;
impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}
impl<M: HasComponent<()>> Component<M> for Foo {
type Interface = u8;
} Note: I used perses for reducing most of the unneeded code, and cargo-expand to put everything in one big file. |
@fee1-dead Thanks for doing that, I'll edit my original post to link to your reply to see a code example. P.S. |
Triage: It now returns some compiler errors and is no longer ICE, fixed by #91844, I guess. Marking as |
@dnavre Just in case, if you could check your code with the latest nightly, it'd be great. |
@JohnTitor Indeed, tested with the latest nightly this produces various compiler errors and no ICE. Thank you! |
Add tests for three old ICEs Closes rust-lang#84044 Closes rust-lang#91594 Closes rust-lang#89066
Add tests for three old ICEs Closes rust-lang#84044 Closes rust-lang#91594 Closes rust-lang#89066
Add tests for three old ICEs Closes rust-lang#84044 Closes rust-lang#91594 Closes rust-lang#89066
Code
I'm a complete Rust newbie and most of the time I have no idea of what I'm doing. So my source code is probably completely weird and f*cked up by the standards of a seasoned Rust developer. Still, I don't think my compiler should be panicking :) Also please note that the source code is definitely not even supposed to compile, it DOES have a number of syntax errors, however, I would expect a reasonable error message explaining what I'm doing wrong.
The whole project can be found here: XXXBig thanks to @fee1-dead who has minimized the code to a very simple test case that crashes the compiler: #91594 (comment)
I also found several similar bugs reported but I'm still not sure if this is a duplicate or not. Similar bug reports:
#55765
#25036
To reproduce:
Meta
The bug does exist in the current nightly build.
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: