From the docs for BTreeSet:

We see four impls, but there really should be just one. It's also interesting that iter doesn't require T: Ord. These impls are much different from the ones in BTreeMap, HashSet, and HashMap. I see no reason for why they should be written this way.
Should we put all methods in just a single impl<T> BTreeSet<T> where T: Ord block instead?
Technically, that'd be a breaking change since iter currently doesn't need T: Ord, but you can't construct a BTreeSet without the bound anyway. You can reach for unsafe to create a BTreeSet<T> even if T doesn't impl Ord, but it's very unlikely that such code exists in the wild. In any case, I'd consider the missing bound on iter simply a bug.
From the docs for
BTreeSet:We see four impls, but there really should be just one. It's also interesting that
iterdoesn't requireT: Ord. These impls are much different from the ones inBTreeMap,HashSet, andHashMap. I see no reason for why they should be written this way.Should we put all methods in just a single
impl<T> BTreeSet<T> where T: Ordblock instead?Technically, that'd be a breaking change since
itercurrently doesn't needT: Ord, but you can't construct aBTreeSetwithout the bound anyway. You can reach forunsafeto create aBTreeSet<T>even ifTdoesn't implOrd, but it's very unlikely that such code exists in the wild. In any case, I'd consider the missing bound onitersimply a bug.