Skip to content

Commit bf3fd17

Browse files
authored
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.
2 parents 8bfb420 + d5acd23 commit bf3fd17

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/liballoc/slice.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,14 @@ impl [u8] {
17251725
reason = "trait should not have to exist",
17261726
issue = "27747")]
17271727
/// An extension trait for concatenating slices
1728+
///
1729+
/// While this trait is unstable, the methods are stable. `SliceConcatExt` is
1730+
/// included in the [standard library prelude], so you can use [`join()`] and
1731+
/// [`concat()`] as if they existed on `[T]` itself.
1732+
///
1733+
/// [standard library prelude]: ../../std/prelude/index.html
1734+
/// [`join()`]: #tymethod.join
1735+
/// [`concat()`]: #tymethod.concat
17281736
pub trait SliceConcatExt<T: ?Sized> {
17291737
#[unstable(feature = "slice_concat_ext",
17301738
reason = "trait should not have to exist",

0 commit comments

Comments
 (0)