I'm writing an algebraic numbers library, and I've run into a bug where rustc gives only one error:
error[E0284]: type annotations required: cannot resolve `for<'a> <T as std::ops::Div<&'a T>>::Output == T`
--> src/polynomial.rs:602:32
|
602 | impl<T: PolynomialCoefficient> PolynomialDivSupported for T
| ^^^^^^^^^^^^^^^^^^^^^^
The relevant code:
polynomial.rs:602-610
impl<T: PolynomialCoefficient> PolynomialDivSupported for T
where
T: for<'a> ExactDiv<&'a T, Output = T>
+ for<'a> Div<&'a T, Output = T>
+ AlwaysExactDivAssign
+ for<'a> AlwaysExactDivAssign<&'a T>,
for<'b> T::Element: ExactDivAssign<&'b T::Element> + One + ExactDivAssign,
{
}
I'm pretty sure I missing trait bounds somewhere and/or there's a rustc bug. Any suggestions?