]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/ring_buf.rs
make `IndexMut` a super trait over `Index`
[rust.git] / src / libcollections / ring_buf.rs
index 83828940ab8bb20eb546080fda6d455cdfab2ed5..417493038404a11ecb4d59526c1fe308a2cdc12b 100644 (file)
@@ -388,7 +388,7 @@ pub fn reserve(&mut self, additional: usize) {
     /// use std::collections::RingBuf;
     ///
     /// let mut buf = RingBuf::with_capacity(15);
-    /// buf.extend(0u..4);
+    /// buf.extend(0..4);
     /// assert_eq!(buf.capacity(), 15);
     /// buf.shrink_to_fit();
     /// assert!(buf.capacity() >= 4);
@@ -1591,8 +1591,6 @@ fn index(&self, i: &usize) -> &A {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<A> IndexMut<usize> for RingBuf<A> {
-    type Output = A;
-
     #[inline]
     fn index_mut(&mut self, i: &usize) -> &mut A {
         self.get_mut(*i).expect("Out of bounds access")