-
Notifications
You must be signed in to change notification settings - Fork 182
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
StreamingIterator code panics with "zipping things of mixed type" #70
Comments
I just realized, the
|
That is indeed a bug, though it may be that the bug is in the input. Chalk doesn't do that much sanity checking just now. |
I think that this is indeed a bug (I encountered it as well), which seems to occur when dealing with higher kinded associated types. The fix I guess is just to change the return Err(NoSolution); |
That sounds suspicious to me! Is it possible to reduce the test case at all? |
I don't actually get this result:
|
I've had this error before and I think — that is to say, if I've bisected correctly :) — that it was recently fixed by removing the fallback clauses: c92c25d |
The bug at the origin of this issue was still there though, but was fixed in #82. |
Since this issue has been closed, I tested out the above code with the current version of chalk, and indeed it no longer panics. Instead, it outputs "error: trait impl for "IntoStreamingIterator" does not meet well-formedness requirements". Does anyone know why it is not well-formed, and what would need to be changed to make it well-formed? |
The recursive solver has some problems with projection types, try with the option |
@scalexm no dice. The following two examples both produce the same well-formedness error message, even with trait StreamingIterator {
type Item<'a>;
}
trait IntoStreamingIterator where Self::IntoIter: StreamingIterator {
type Item<'a>;
type IntoIter;
}
impl<S> IntoStreamingIterator for S where S: StreamingIterator {
type Item<'a> = <S as StreamingIterator>::Item<'a>;
type IntoIter = S;
} trait StreamingIterator {
type Item<'a>;
}
trait IntoStreamingIterator where Self::IntoIter: StreamingIterator {
type IntoIter;
}
impl<S> IntoStreamingIterator for S where S: StreamingIterator {
type IntoIter = S;
} |
There's still
However, since well-formedness requirements are enforced during lowering (i.e. the program is loading, you cannot write any goal), one cannot use |
@scalexm good point, I replaced |
The following program panics with the error message "zipping things of mixed type", after outputting
a = '?0, b = Array3<i32>
.output including backtrace
The text was updated successfully, but these errors were encountered: