]> git.lizzy.rs Git - rust.git/commitdiff
Add #![feature(exact_chunks)] to the documentation examples to fix the doc tests
authorSebastian Dröge <sebastian@centricular.com>
Tue, 2 Jan 2018 12:54:18 +0000 (14:54 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 13 Jan 2018 10:18:51 +0000 (12:18 +0200)
src/liballoc/slice.rs

index bae366736379cea0b71bb56516486f0191a0939a..6a3970f37285c5364498d511d2bdf5eda06a397a 100644 (file)
@@ -645,6 +645,8 @@ pub fn chunks(&self, chunk_size: usize) -> Chunks<T> {
     /// # Examples
     ///
     /// ```
+    /// #![feature(exact_chunks)]
+    ///
     /// let slice = ['l', 'o', 'r', 'e', 'm'];
     /// let mut iter = slice.chunks(2);
     /// assert_eq!(iter.next().unwrap(), &['l', 'o']);
@@ -699,6 +701,8 @@ pub fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<T> {
     /// # Examples
     ///
     /// ```
+    /// #![feature(exact_chunks)]
+    ///
     /// let v = &mut [0, 0, 0, 0, 0];
     /// let mut count = 1;
     ///