-
Notifications
You must be signed in to change notification settings - Fork 67
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
Possible regression: Updating 2.8.0 to 2.9.0 causes "type annotations needed" for BTreeSet::range
etc.
#105
Comments
The workaround is to explicitly specify the type parameter use std::collections::BTreeSet;
use ordered_float::NotNan;
fn main() {
let a = BTreeSet::<NotNan<f64>>::new();
let b = a.range::<NotNan<f64>, _>(..);
} |
Hmm, this was caused by #98. |
Isn't it strange that implementing a trait make type inference fail? I'm wondering if this tends to happen, or it is a bug (or something can be improved) of Rust compiler. |
The However, |
Closed accidentally. I meant to close #91, not this one. |
See the following code:
In 2.8.0, this code compiles. In 2.9.0 and 2.10.0, it causes the following error:
Copyable text
I cannot figure out at all why this error happens, but this is indeed a regression.
The text was updated successfully, but these errors were encountered: