about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2017-06-01 17:26:52 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2017-06-01 17:26:52 -0700
commit818ca9822242bc736ebef1e13f8a6df52b250dcd (patch)
tree24f3e514e785d66acd6b543631f78ee417463e33 /src/libcollections
parent4ed2edaafe82fb8d44e81e00ca3e4f7659855ba2 (diff)
downloadrust-818ca9822242bc736ebef1e13f8a6df52b250dcd.tar.gz
rust-818ca9822242bc736ebef1e13f8a6df52b250dcd.zip
Add [[T]] -> [T] examples to SliceConcatExt docs
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/slice.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs
index 233ff8a5154..15efd122909 100644
--- a/src/libcollections/slice.rs
+++ b/src/libcollections/slice.rs
@@ -1460,6 +1460,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;
@@ -1471,6 +1472,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;