diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index 1683b8105567f..b71a9035c19e5 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -845,7 +845,7 @@ impl BTreeMap { /// .iter() /// .map(|&s| (s, 0)) /// .collect(); - /// for (_, balance) in map.range_mut("B".."Cheryl") { + /// for (_, balance) in map.range_mut::("B".."Cheryl") { /// *balance += 100; /// } /// for (name, balance) in &map { diff --git a/src/libcore/ops/range.rs b/src/libcore/ops/range.rs index 1b4c4218cc15b..9995b4f9ef54a 100644 --- a/src/libcore/ops/range.rs +++ b/src/libcore/ops/range.rs @@ -884,7 +884,7 @@ impl<'a, T: ?Sized + 'a> RangeBounds for (Bound<&'a T>, Bound<&'a T>) { } #[stable(feature = "collections_range", since = "1.28.0")] -impl RangeBounds for RangeFrom<&T> { +impl RangeBounds for RangeFrom<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -894,7 +894,7 @@ impl RangeBounds for RangeFrom<&T> { } #[stable(feature = "collections_range", since = "1.28.0")] -impl RangeBounds for RangeTo<&T> { +impl RangeBounds for RangeTo<&T> { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -904,7 +904,7 @@ impl RangeBounds for RangeTo<&T> { } #[stable(feature = "collections_range", since = "1.28.0")] -impl RangeBounds for Range<&T> { +impl RangeBounds for Range<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) }