-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE with trait object + associated type #26866
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
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
I forgot to show the output of compilation:
|
Smaller example: pub struct Foo;
impl Foo {
pub fn shrink(&self) -> Box<Iterator<Item=Foo>> {
Box::new(None.into_iter())
}
}
fn main() {
} |
This also seems to only happen if the associated type binding is the pub struct Foo;
impl Foo {
pub fn shrink(&self) -> Box<Iterator<Item=String>> {
Box::new(None.into_iter())
}
}
fn main() {
} |
Incidentally, those examples are very close to the test case added in #26807. |
All three examples in this issue compile now. |
Yay! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably not minimal example:
Version:
rustc 1.3.0-nightly (6d71ce536 2015-07-06)
This code was working on the previous nightly---I think the 2015-07-06 nightly introduced this regression. In particular, this very badly breaks any non-trivial use of QuickCheck (which has the same signature as
shrink
above).The text was updated successfully, but these errors were encountered: