From d5acd235658bd8d52db53aa10452620642b715dc Mon Sep 17 00:00:00 2001 From: David Ross Date: Mon, 1 Jan 2018 19:14:32 -0800 Subject: [PATCH] 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. --- src/liballoc/slice.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index ab574c9f7e769..fecea3339d2b9 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 { #[unstable(feature = "slice_concat_ext", reason = "trait should not have to exist",