Skip to content

Commit a891be4

Browse files
Rollup merge of #42370 - mbrubeck:docs, r=frewsxcv
Add [[T]] -> [T] examples to SliceConcatExt docs None
2 parents 0e8135f + 818ca98 commit a891be4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcollections/slice.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ pub trait SliceConcatExt<T: ?Sized> {
15151515
///
15161516
/// ```
15171517
/// assert_eq!(["hello", "world"].concat(), "helloworld");
1518+
/// assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
15181519
/// ```
15191520
#[stable(feature = "rust1", since = "1.0.0")]
15201521
fn concat(&self) -> Self::Output;
@@ -1526,6 +1527,7 @@ pub trait SliceConcatExt<T: ?Sized> {
15261527
///
15271528
/// ```
15281529
/// assert_eq!(["hello", "world"].join(" "), "hello world");
1530+
/// assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
15291531
/// ```
15301532
#[stable(feature = "rename_connect_to_join", since = "1.3.0")]
15311533
fn join(&self, sep: &T) -> Self::Output;

0 commit comments

Comments
 (0)