diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index 7fb0041a97b6..3136770e1e39 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -655,10 +655,12 @@ impl BTreeMap { self.fix_right_edge(); } - /// Constructs a double-ended iterator over a sub-range of elements in the map, starting - /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative - /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity". - /// Thus range(Unbounded, Unbounded) will yield the whole collection. + /// Constructs a double-ended iterator over a sub-range of elements in the map. + /// The simplest way is to use the range synax `min..max`, thus `range(..)` will + /// yield the whole collection. + /// The range may also be entered as `(Bound, Bound)`, so for example + /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive + /// range. /// /// # Examples /// @@ -745,10 +747,12 @@ impl BTreeMap { } } - /// Constructs a mutable double-ended iterator over a sub-range of elements in the map, starting - /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative - /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity". - /// Thus range(Unbounded, Unbounded) will yield the whole collection. + /// Constructs a mutable double-ended iterator over a sub-range of elements in the map. + /// The simplest way is to use the range synax `min..max`, thus `range(..)` will + /// yield the whole collection. + /// The range may also be entered as `(Bound, Bound)`, so for example + /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive + /// range. /// /// # Examples /// diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 876b6bb8d6ad..b19633fa7fb0 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -207,10 +207,12 @@ impl BTreeSet { } impl BTreeSet { - /// Constructs a double-ended iterator over a sub-range of elements in the set, starting - /// at min, and ending at max. If min is `Unbounded`, then it will be treated as "negative - /// infinity", and if max is `Unbounded`, then it will be treated as "positive infinity". - /// Thus range(Unbounded, Unbounded) will yield the whole collection. + /// Constructs a double-ended iterator over a sub-range of elements in the set. + /// The simplest way is to use the range synax `min..max`, thus `range(..)` will + /// yield the whole collection. + /// The range may also be entered as `(Bound, Bound)`, so for example + /// `range((Excluded(4), Included(10)))` will yield a left-exclusive, right-inclusive + /// range. /// /// # Examples ///