]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/slice.rs
Rollup merge of #42370 - mbrubeck:docs, r=frewsxcv
[rust.git] / src / libcollections / slice.rs
index 3b493f5e068d5fac2b0eec83ccd24a91870bc019..97d6687c79b5749aaa3d69e5d0d64a373cb0f133 100644 (file)
@@ -1515,6 +1515,7 @@ pub trait SliceConcatExt<T: ?Sized> {
     ///
     /// ```
     /// assert_eq!(["hello", "world"].concat(), "helloworld");
+    /// assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn concat(&self) -> Self::Output;
@@ -1526,6 +1527,7 @@ pub trait SliceConcatExt<T: ?Sized> {
     ///
     /// ```
     /// assert_eq!(["hello", "world"].join(" "), "hello world");
+    /// assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
     /// ```
     #[stable(feature = "rename_connect_to_join", since = "1.3.0")]
     fn join(&self, sep: &T) -> Self::Output;