-
Notifications
You must be signed in to change notification settings - Fork 21
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: to_sort_list
called on bound variable list with non-refinements
#808
Comments
#812 fixes the issue with
|
I'm seeing a lot of these |
@ranjitjhala This is a bit tricky. When we normalize impl<T1, ..., Tn> MyTrait<...> for MyType<..> {
type Assoc = ...
} Where impl<T> MyTrait for MyType<T> {
type Assoc = T;
} And we are trying to normalize Now, the implementation of impl<B, I: Iterator, F> Iterator for FilterMap<I, F>
where
F: FnMut(I::Item) -> Option<B>,
{
type Item = B;
...
} The F: FnMut<I::Item>,
F::Output == Option<B> The second equality bound is constraining |
interesting... what is the method name we're working with here? does the |
This happens when normalizing this signature pub fn get_filter_map(
) -> core::iter::FilterMap<core::slice::Iter<'static, Option<()>>, fn(&Option<()>) -> Option<()>>; In this case
|
I think implementing the logic above is not too crazy. Another alternative is to try to improve our fallback when there are no refinements to be seen. |
Anyhow, here's a minimal reproduction of the issue trait Trait1 {
type Assoc1;
}
impl Trait1 for i32 {
type Assoc1 = i32;
}
trait Trait2 {
type Assoc2;
}
struct S<T> {
f: T,
}
impl<T1, T2> Trait2 for S<T2>
where
T2: Trait1<Assoc1 = T1>,
{
type Assoc2 = T1;
}
fn test(x: <S<i32> as Trait2>::Assoc2) {} |
Closing the "original" issue as solved; have forked the second thing out in #829 |
This is a test case reduction of one of the Tock errors.
When I try to verify the code:
It triggers the error:
This error occurs 3 times in Tock, always with the FilterMap struct.
The text was updated successfully, but these errors were encountered: