Skip to content

Commit 0f84f75

Browse files
committed
Auto merge of rust-lang#138031 - workingjubilee:rollup-5bsotpz, r=workingjubilee
Rollup of 15 pull requests Successful merges: - rust-lang#137829 (Stabilize [T]::split_off... methods) - rust-lang#137850 (Stabilize `box_uninit_write`) - rust-lang#137912 (Do not recover missing lifetime with random in-scope lifetime) - rust-lang#137913 (Allow struct field default values to reference struct's generics) - rust-lang#137923 (Simplify `<Postorder as Iterator>::size_hint`) - rust-lang#137949 (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK) - rust-lang#137963 (Add ``dyn`` keyword to `E0373` examples) - rust-lang#137975 (Remove unused `PpMode::needs_hir`) - rust-lang#137981 (rustdoc search: increase strictness of typechecking) - rust-lang#137986 (Fix some typos) - rust-lang#137991 (Add `avr-none` to SUMMARY.md and platform-support.md) - rust-lang#137993 (Remove obsolete comment from DeduceReadOnly) - rust-lang#137996 (Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync"") - rust-lang#138019 (Pretty-print `#[deprecated]` attribute in HIR.) - rust-lang#138026 (Make CrateItem::body() function return an option) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4a7fcd9 + 784016e commit 0f84f75

File tree

5 files changed

+9
-33
lines changed

5 files changed

+9
-33
lines changed

alloc/src/boxed.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,6 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
937937
/// # Examples
938938
///
939939
/// ```
940-
/// #![feature(box_uninit_write)]
941-
///
942940
/// let big_box = Box::<[usize; 1024]>::new_uninit();
943941
///
944942
/// let mut array = [0; 1024];
@@ -954,7 +952,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
954952
/// assert_eq!(*x, i);
955953
/// }
956954
/// ```
957-
#[unstable(feature = "box_uninit_write", issue = "129397")]
955+
#[stable(feature = "box_uninit_write", since = "CURRENT_RUSTC_VERSION")]
958956
#[inline]
959957
pub fn write(mut boxed: Self, value: T) -> Box<T, A> {
960958
unsafe {

alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
#![feature(assert_matches)]
103103
#![feature(async_fn_traits)]
104104
#![feature(async_iterator)]
105-
#![feature(box_uninit_write)]
106105
#![feature(bstr)]
107106
#![feature(bstr_internals)]
108107
#![feature(char_max_len)]

core/src/slice/mod.rs

+7-27
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub use raw::{from_raw_parts, from_raw_parts_mut};
7878

7979
/// Calculates the direction and split point of a one-sided range.
8080
///
81-
/// This is a helper function for `take` and `take_mut` that returns
81+
/// This is a helper function for `split_off` and `split_off_mut` that returns
8282
/// the direction of the split (front or back) as well as the index at
8383
/// which to split. Returns `None` if the split index would overflow.
8484
#[inline]
@@ -4313,8 +4313,6 @@ impl<T> [T] {
43134313
/// Splitting off the first three elements of a slice:
43144314
///
43154315
/// ```
4316-
/// #![feature(slice_take)]
4317-
///
43184316
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
43194317
/// let mut first_three = slice.split_off(..3).unwrap();
43204318
///
@@ -4325,8 +4323,6 @@ impl<T> [T] {
43254323
/// Splitting off the last two elements of a slice:
43264324
///
43274325
/// ```
4328-
/// #![feature(slice_take)]
4329-
///
43304326
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
43314327
/// let mut tail = slice.split_off(2..).unwrap();
43324328
///
@@ -4337,8 +4333,6 @@ impl<T> [T] {
43374333
/// Getting `None` when `range` is out of bounds:
43384334
///
43394335
/// ```
4340-
/// #![feature(slice_take)]
4341-
///
43424336
/// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
43434337
///
43444338
/// assert_eq!(None, slice.split_off(5..));
@@ -4349,7 +4343,7 @@ impl<T> [T] {
43494343
/// ```
43504344
#[inline]
43514345
#[must_use = "method does not modify the slice if the range is out of bounds"]
4352-
#[unstable(feature = "slice_take", issue = "62280")]
4346+
#[stable(feature = "slice_take", since = "CURRENT_RUSTC_VERSION")]
43534347
pub fn split_off<'a, R: OneSidedRange<usize>>(
43544348
self: &mut &'a Self,
43554349
range: R,
@@ -4385,8 +4379,6 @@ impl<T> [T] {
43854379
/// Splitting off the first three elements of a slice:
43864380
///
43874381
/// ```
4388-
/// #![feature(slice_take)]
4389-
///
43904382
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
43914383
/// let mut first_three = slice.split_off_mut(..3).unwrap();
43924384
///
@@ -4397,8 +4389,6 @@ impl<T> [T] {
43974389
/// Taking the last two elements of a slice:
43984390
///
43994391
/// ```
4400-
/// #![feature(slice_take)]
4401-
///
44024392
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
44034393
/// let mut tail = slice.split_off_mut(2..).unwrap();
44044394
///
@@ -4409,8 +4399,6 @@ impl<T> [T] {
44094399
/// Getting `None` when `range` is out of bounds:
44104400
///
44114401
/// ```
4412-
/// #![feature(slice_take)]
4413-
///
44144402
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
44154403
///
44164404
/// assert_eq!(None, slice.split_off_mut(5..));
@@ -4421,7 +4409,7 @@ impl<T> [T] {
44214409
/// ```
44224410
#[inline]
44234411
#[must_use = "method does not modify the slice if the range is out of bounds"]
4424-
#[unstable(feature = "slice_take", issue = "62280")]
4412+
#[stable(feature = "slice_take", since = "CURRENT_RUSTC_VERSION")]
44254413
pub fn split_off_mut<'a, R: OneSidedRange<usize>>(
44264414
self: &mut &'a mut Self,
44274415
range: R,
@@ -4451,16 +4439,14 @@ impl<T> [T] {
44514439
/// # Examples
44524440
///
44534441
/// ```
4454-
/// #![feature(slice_take)]
4455-
///
44564442
/// let mut slice: &[_] = &['a', 'b', 'c'];
44574443
/// let first = slice.split_off_first().unwrap();
44584444
///
44594445
/// assert_eq!(slice, &['b', 'c']);
44604446
/// assert_eq!(first, &'a');
44614447
/// ```
44624448
#[inline]
4463-
#[unstable(feature = "slice_take", issue = "62280")]
4449+
#[stable(feature = "slice_take", since = "CURRENT_RUSTC_VERSION")]
44644450
pub fn split_off_first<'a>(self: &mut &'a Self) -> Option<&'a T> {
44654451
let (first, rem) = self.split_first()?;
44664452
*self = rem;
@@ -4475,8 +4461,6 @@ impl<T> [T] {
44754461
/// # Examples
44764462
///
44774463
/// ```
4478-
/// #![feature(slice_take)]
4479-
///
44804464
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
44814465
/// let first = slice.split_off_first_mut().unwrap();
44824466
/// *first = 'd';
@@ -4485,7 +4469,7 @@ impl<T> [T] {
44854469
/// assert_eq!(first, &'d');
44864470
/// ```
44874471
#[inline]
4488-
#[unstable(feature = "slice_take", issue = "62280")]
4472+
#[stable(feature = "slice_take", since = "CURRENT_RUSTC_VERSION")]
44894473
pub fn split_off_first_mut<'a>(self: &mut &'a mut Self) -> Option<&'a mut T> {
44904474
let (first, rem) = mem::take(self).split_first_mut()?;
44914475
*self = rem;
@@ -4500,16 +4484,14 @@ impl<T> [T] {
45004484
/// # Examples
45014485
///
45024486
/// ```
4503-
/// #![feature(slice_take)]
4504-
///
45054487
/// let mut slice: &[_] = &['a', 'b', 'c'];
45064488
/// let last = slice.split_off_last().unwrap();
45074489
///
45084490
/// assert_eq!(slice, &['a', 'b']);
45094491
/// assert_eq!(last, &'c');
45104492
/// ```
45114493
#[inline]
4512-
#[unstable(feature = "slice_take", issue = "62280")]
4494+
#[stable(feature = "slice_take", since = "CURRENT_RUSTC_VERSION")]
45134495
pub fn split_off_last<'a>(self: &mut &'a Self) -> Option<&'a T> {
45144496
let (last, rem) = self.split_last()?;
45154497
*self = rem;
@@ -4524,8 +4506,6 @@ impl<T> [T] {
45244506
/// # Examples
45254507
///
45264508
/// ```
4527-
/// #![feature(slice_take)]
4528-
///
45294509
/// let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
45304510
/// let last = slice.split_off_last_mut().unwrap();
45314511
/// *last = 'd';
@@ -4534,7 +4514,7 @@ impl<T> [T] {
45344514
/// assert_eq!(last, &'d');
45354515
/// ```
45364516
#[inline]
4537-
#[unstable(feature = "slice_take", issue = "62280")]
4517+
#[stable(feature = "slice_take", since = "CURRENT_RUSTC_VERSION")]
45384518
pub fn split_off_last_mut<'a>(self: &mut &'a mut Self) -> Option<&'a mut T> {
45394519
let (last, rem) = mem::take(self).split_last_mut()?;
45404520
*self = rem;

coretests/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
#![feature(slice_internals)]
7474
#![feature(slice_partition_dedup)]
7575
#![feature(slice_split_once)]
76-
#![feature(slice_take)]
7776
#![feature(split_array)]
7877
#![feature(split_as_slice)]
7978
#![feature(std_internals)]

std/src/sys/pal/uefi/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ mod uefi_command_internal {
757757
}
758758

759759
/// Create a map of environment variable changes. Allows efficient setting and rolling back of
760-
/// enviroment variable changes.
760+
/// environment variable changes.
761761
///
762762
/// Entry: (Old Value, New Value)
763763
fn env_changes(env: &CommandEnv) -> Option<BTreeMap<EnvKey, (Option<OsString>, Option<OsString>)>> {

0 commit comments

Comments
 (0)