Skip to content

Commit d5acd23

Browse files
committed
Mention SliceConcatExt's stability in its docs
SliceConcatExt's status as an unstable trait with stable methods is documented in the compiler error for using it, and in https://doc.rust-lang.org/std/prelude/, but it is not mentioned in the trait itself. Mentioning the methods can be used in stable rust today should help users who are looking for a `join` method while working on stable rust.
1 parent b65f0be commit d5acd23

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)