diff options
| author | kennytm <kennytm@gmail.com> | 2018-01-03 16:58:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-03 16:58:02 +0800 |
| commit | bf3fd1744c3a647ed1d8d8448706c4945cc2e9ab (patch) | |
| tree | bdfe959171111d6251f76825629d76b913f28890 /src/liballoc/slice.rs | |
| parent | 8bfb420d63e69db7695d236b5f9fae3027396dfa (diff) | |
| parent | d5acd235658bd8d52db53aa10452620642b715dc (diff) | |
| download | rust-bf3fd1744c3a647ed1d8d8448706c4945cc2e9ab.tar.gz rust-bf3fd1744c3a647ed1d8d8448706c4945cc2e9ab.zip | |
Rollup merge of #47125 - daboross:patch-3, r=estebank
Mention SliceConcatExt's stability in its docs Just saw someone in IRC mention there being no stable way to join string slices! It isn't entirely clear from the rust documentation that `SliceConcatExt` is usable. While this is mentioned in https://doc.rust-lang.org/std/prelude/, the trait has nothing to indicate that it's currently usable if found via a documentation search. The wording on this could probably be improved, but I'm hoping its better than nothing.
Diffstat (limited to 'src/liballoc/slice.rs')
| -rw-r--r-- | src/liballoc/slice.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index b880616833a..fa73197885b 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -1725,6 +1725,14 @@ impl [u8] { reason = "trait should not have to exist", issue = "27747")] /// An extension trait for concatenating slices +/// +/// While this trait is unstable, the methods are stable. `SliceConcatExt` is +/// included in the [standard library prelude], so you can use [`join()`] and +/// [`concat()`] as if they existed on `[T]` itself. +/// +/// [standard library prelude]: ../../std/prelude/index.html +/// [`join()`]: #tymethod.join +/// [`concat()`]: #tymethod.concat pub trait SliceConcatExt<T: ?Sized> { #[unstable(feature = "slice_concat_ext", reason = "trait should not have to exist", |
