diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-06-02 09:10:48 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-02 09:10:48 -0600 |
| commit | 1a3d026094711ceb32f5f55d32b6cf2a4711b4c2 (patch) | |
| tree | 02c38e3d3c668e45a80e86c4daa2275f6d94807d | |
| parent | 7a2d4b30b6d09f9091b2a4666c894a854b5d781c (diff) | |
| parent | 818ca9822242bc736ebef1e13f8a6df52b250dcd (diff) | |
| download | rust-1a3d026094711ceb32f5f55d32b6cf2a4711b4c2.tar.gz rust-1a3d026094711ceb32f5f55d32b6cf2a4711b4c2.zip | |
Rollup merge of #42370 - mbrubeck:docs, r=frewsxcv
Add [[T]] -> [T] examples to SliceConcatExt docs None
| -rw-r--r-- | src/libcollections/slice.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 3b493f5e068..97d6687c79b 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -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; |
