See the following code:
use std::collections::BTreeSet;
use ordered_float::NotNan;
fn main() {
let a = BTreeSet::<NotNan<f64>>::new();
let b = a.range(..);
}
In 2.8.0, this code compiles. In 2.9.0 and 2.10.0, it causes the following error:

Copyable text
error[E0283]: type annotations needed
--> src/main.rs:6:15
|
6 | let b = a.range(..);
| ^^^^^ cannot infer type for type parameter `K` declared on the associated function `range`
|
= note: cannot satisfy `_: Ord`
I cannot figure out at all why this error happens, but this is indeed a regression.
$ rustc --version
rustc 1.57.0 (f1edd0429 2021-11-29)