If the key type isn't trivial (there's probably a better word for that), calling range(..)
on a BTreeMap
or BTreeSet
makes the compiler cry E0283 "type annotations needed", forcing us to specify the collection's key type again, as in this playground example.
Is this a recurring issue with RangeFull
in Rust or a weak spot in the definition of range
? I don't know if or how T
could default to the key type K
.