/// Returns the remainder of the original slice that is not going to be
/// returned by the iterator. The returned slice has at most `chunk_size-1`
/// elements.
+ ///
+ /// # Example
+ ///
+ /// ```
+ /// let slice = ['l', 'o', 'r', 'e', 'm'];
+ /// let mut iter = slice.chunks_exact(2);
+ /// assert_eq!(iter.remainder(), &['m'][..]);
+ /// assert_eq!(iter.next(), Some(&['l', 'o'][..]));
+ /// assert_eq!(iter.remainder(), &['m'][..]);
+ /// assert_eq!(iter.next(), Some(&['r', 'e'][..]));
+ /// assert_eq!(iter.remainder(), &['m'][..]);
+ /// assert_eq!(iter.next(), None);
+ /// assert_eq!(iter.remainder(), &['m'][..]);
+ /// ```
#[must_use]
#[stable(feature = "chunks_exact", since = "1.31.0")]
pub fn remainder(&self) -> &'a [T] {
/// ```
///
/// [`rchunks_exact`]: slice::rchunks_exact
-/// [`remainder`]: ChunksExact::remainder
+/// [`remainder`]: RChunksExact::remainder
/// [slices]: slice
#[derive(Debug)]
#[stable(feature = "rchunks", since = "1.31.0")]
/// Returns the remainder of the original slice that is not going to be
/// returned by the iterator. The returned slice has at most `chunk_size-1`
/// elements.
+ ///
+ /// # Example
+ ///
+ /// ```
+ /// let slice = ['l', 'o', 'r', 'e', 'm'];
+ /// let mut iter = slice.rchunks_exact(2);
+ /// assert_eq!(iter.remainder(), &['l'][..]);
+ /// assert_eq!(iter.next(), Some(&['e', 'm'][..]));
+ /// assert_eq!(iter.remainder(), &['l'][..]);
+ /// assert_eq!(iter.next(), Some(&['o', 'r'][..]));
+ /// assert_eq!(iter.remainder(), &['l'][..]);
+ /// assert_eq!(iter.next(), None);
+ /// assert_eq!(iter.remainder(), &['l'][..]);
+ /// ```
#[must_use]
#[stable(feature = "rchunks", since = "1.31.0")]
pub fn remainder(&self) -> &'a [T] {
/// ```
///
/// [`rchunks_exact_mut`]: slice::rchunks_exact_mut
-/// [`into_remainder`]: ChunksExactMut::into_remainder
+/// [`into_remainder`]: RChunksExactMut::into_remainder
/// [slices]: slice
#[derive(Debug)]
#[stable(feature = "rchunks", since = "1.31.0")]