We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
trait Trait { type Item; } fn foo<A: Trait, B: Trait>() where A::Item: Trait<Item = u32>, B::Item: Trait<Item = i32>, {}
this should compile but fails with
error[E0283]: type annotations needed: cannot satisfy `<A as Trait>::Item: Trait` --> <source>:7:14 | 7 | A::Item: Trait<Item = u32>, | ^^^^^^^^^^^^^^^^^ |
The underlying issue is trying to prove <A as Trait>::Item: Trait normalizes the self type:
<A as Trait>::Item: Trait
normalizes-to(<A as Trait>::Item)
A::Item: Trait<Item = u32>
alias-relate(A::Item, A)
B::Item: Trait<Item = i32>
alias-relate(B::Item, A)
normalizes-to(<B as Trait>::Item)
alias-relate(A::Item, B)
alias-relate(B::Item, B)
The text was updated successfully, but these errors were encountered:
original test by @aliemjay ❤️
pub trait ParallelIterator { type Item; } impl<T> ParallelIterator for T { type Item = u32; } trait Trait {} impl<A, B> Trait for (A, B) where //~^ type annotations needed: cannot satisfy `<<A as ParallelIterator>::Item as ParallelIterator>::Item == u32` A: ParallelIterator, A::Item: ParallelIterator<Item = u32>, B: ParallelIterator, B::Item: ParallelIterator<Item = u32>, {} fn main() {}
Sorry, something went wrong.
this is the underlying reason for #111, closing that issue
trait Trait<'a> { type Assoc; } fn foo<'a, T: Trait<'a>>() where T::Assoc: Trait<'a>, {}
this may also be the root cause of #89
No branches or pull requests
this should compile but fails with
The underlying issue is trying to prove
<A as Trait>::Item: Trait
normalizes the self type:normalizes-to(<A as Trait>::Item)
A::Item: Trait<Item = u32>
alias-relate(A::Item, A)
normalizes-to(<A as Trait>::Item)
inductive cycleB::Item: Trait<Item = i32>
alias-relate(B::Item, A)
normalizes-to(<B as Trait>::Item)
A::Item: Trait<Item = u32>
alias-relate(A::Item, B)
normalizes-to(<A as Trait>::Item)
inductive cycleB::Item: Trait<Item = i32>
alias-relate(B::Item, B)
normalizes-to(<B as Trait>::Item)
inductive cycleThe text was updated successfully, but these errors were encountered: