about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-03 10:07:39 +0000
committerbors <bors@rust-lang.org>2018-01-03 10:07:39 +0000
commitb107f720e5422bff4fa0671e54ff5458f682f603 (patch)
tree59197850b7f1943febf23868ec974ea9b451096f /src/liballoc
parentb8934399a85b67213f2593abb04a7e9be42df675 (diff)
parentb4161194721c5fc36c452047ba00433c6da228a0 (diff)
downloadrust-b107f720e5422bff4fa0671e54ff5458f682f603.tar.gz
rust-b107f720e5422bff4fa0671e54ff5458f682f603.zip
Auto merge of #47151 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #47104, #47107, #47113, #47117, #47118, #47121, #47125, #47134, #47145
- Failed merges:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/slice.rs20
-rw-r--r--src/liballoc/vec.rs2
2 files changed, 15 insertions, 7 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index ab574c9f7e7..fa73197885b 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -606,14 +606,14 @@ impl<T> [T] {
         core_slice::SliceExt::windows(self, size)
     }
 
-    /// Returns an iterator over `size` elements of the slice at a
-    /// time. The chunks are slices and do not overlap. If `size` does
+    /// Returns an iterator over `chunk_size` elements of the slice at a
+    /// time. The chunks are slices and do not overlap. If `chunk_size` does
     /// not divide the length of the slice, then the last chunk will
-    /// not have length `size`.
+    /// not have length `chunk_size`.
     ///
     /// # Panics
     ///
-    /// Panics if `size` is 0.
+    /// Panics if `chunk_size` is 0.
     ///
     /// # Examples
     ///
@@ -627,8 +627,8 @@ impl<T> [T] {
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
-    pub fn chunks(&self, size: usize) -> Chunks<T> {
-        core_slice::SliceExt::chunks(self, size)
+    pub fn chunks(&self, chunk_size: usize) -> Chunks<T> {
+        core_slice::SliceExt::chunks(self, chunk_size)
     }
 
     /// Returns an iterator over `chunk_size` elements of the slice at a time.
@@ -1725,6 +1725,14 @@ impl [u8] {
            reason = "trait should not have to exist",
            issue = "27747")]
 /// An extension trait for concatenating slices
+///
+/// While this trait is unstable, the methods are stable. `SliceConcatExt` is
+/// included in the [standard library prelude], so you can use [`join()`] and
+/// [`concat()`] as if they existed on `[T]` itself.
+///
+/// [standard library prelude]: ../../std/prelude/index.html
+/// [`join()`]: #tymethod.join
+/// [`concat()`]: #tymethod.concat
 pub trait SliceConcatExt<T: ?Sized> {
     #[unstable(feature = "slice_concat_ext",
                reason = "trait should not have to exist",
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 93d7e66b7b2..301e44632b8 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -715,7 +715,7 @@ impl<T> Vec<T> {
     ///
     /// # Panics
     ///
-    /// Panics if `index` is out of bounds.
+    /// Panics if `index > len`.
     ///
     /// # Examples
     ///