Rollup merge of #137569 - aDotInTheVoid:for-iurii, r=ibraheemdev

Stabilize `string_extend_from_within`

FCP'd here: https://github.com/rust-lang/rust/issues/103806#issuecomment-2674989531.

Closes  #103806.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-03-05 21:46:41 +08:00 committed by GitHub
commit 604d1ba61c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1134,7 +1134,6 @@ impl String {
/// # Examples
///
/// ```
/// #![feature(string_extend_from_within)]
/// let mut string = String::from("abcde");
///
/// string.extend_from_within(2..);
@ -1147,7 +1146,7 @@ impl String {
/// assert_eq!(string, "abcdecdeabecde");
/// ```
#[cfg(not(no_global_oom_handling))]
#[unstable(feature = "string_extend_from_within", issue = "103806")]
#[stable(feature = "string_extend_from_within", since = "CURRENT_RUSTC_VERSION")]
pub fn extend_from_within<R>(&mut self, src: R)
where
R: RangeBounds<usize>,