Skip to content

Commit 9277453

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents 645c8a8 + 00a38db commit 9277453

File tree

25 files changed

+79
-95
lines changed

25 files changed

+79
-95
lines changed

core/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ debug_typeid = []
2929
[lints.rust.unexpected_cfgs]
3030
level = "warn"
3131
check-cfg = [
32-
# #[cfg(bootstrap)] loongarch32
33-
'cfg(target_arch, values("loongarch32"))',
3432
'cfg(no_fp_fmt_parse)',
3533
# core use #[path] imports to portable-simd `core_simd` crate
3634
# and to stdarch `core_arch` crate which messes-up with Cargo list

core/src/array/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl<T, const N: usize> IntoIter<T, N> {
224224
}
225225
}
226226

227-
#[stable(feature = "array_value_iter_default", since = "CURRENT_RUSTC_VERSION")]
227+
#[stable(feature = "array_value_iter_default", since = "1.89.0")]
228228
impl<T, const N: usize> Default for IntoIter<T, N> {
229229
fn default() -> Self {
230230
IntoIter::empty()

core/src/array/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ impl<T, const N: usize> [T; N] {
588588
/// Returns a mutable slice containing the entire array. Equivalent to
589589
/// `&mut s[..]`.
590590
#[stable(feature = "array_as_slice", since = "1.57.0")]
591-
#[rustc_const_stable(feature = "const_array_as_mut_slice", since = "CURRENT_RUSTC_VERSION")]
591+
#[rustc_const_stable(feature = "const_array_as_mut_slice", since = "1.89.0")]
592592
pub const fn as_mut_slice(&mut self) -> &mut [T] {
593593
self
594594
}
@@ -707,7 +707,7 @@ impl<T, const N: usize> [T; N] {
707707
)]
708708
#[inline]
709709
pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T]) {
710-
(&self[..]).split_first_chunk::<M>().unwrap()
710+
self.split_first_chunk::<M>().unwrap()
711711
}
712712

713713
/// Divides one mutable array reference into two at an index.
@@ -740,7 +740,7 @@ impl<T, const N: usize> [T; N] {
740740
)]
741741
#[inline]
742742
pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T]) {
743-
(&mut self[..]).split_first_chunk_mut::<M>().unwrap()
743+
self.split_first_chunk_mut::<M>().unwrap()
744744
}
745745

746746
/// Divides one array reference into two at an index from the end.
@@ -785,7 +785,7 @@ impl<T, const N: usize> [T; N] {
785785
)]
786786
#[inline]
787787
pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M]) {
788-
(&self[..]).split_last_chunk::<M>().unwrap()
788+
self.split_last_chunk::<M>().unwrap()
789789
}
790790

791791
/// Divides one mutable array reference into two at an index from the end.
@@ -818,7 +818,7 @@ impl<T, const N: usize> [T; N] {
818818
)]
819819
#[inline]
820820
pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M]) {
821-
(&mut self[..]).split_last_chunk_mut::<M>().unwrap()
821+
self.split_last_chunk_mut::<M>().unwrap()
822822
}
823823
}
824824

core/src/cell/lazy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> {
284284
}
285285
}
286286

287-
#[stable(feature = "lazy_deref_mut", since = "CURRENT_RUSTC_VERSION")]
287+
#[stable(feature = "lazy_deref_mut", since = "1.89.0")]
288288
impl<T, F: FnOnce() -> T> DerefMut for LazyCell<T, F> {
289289
#[inline]
290290
fn deref_mut(&mut self) -> &mut T {

core/src/future/future.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use crate::ops;
44
use crate::pin::Pin;
55
use crate::task::{Context, Poll};
66

7-
/// A future represents an asynchronous computation obtained by use of [`async`].
7+
/// A future represents an asynchronous computation, commonly obtained by use of
8+
/// [`async`].
89
///
910
/// A future is a value that might not have finished computing yet. This kind of
1011
/// "asynchronous value" makes it possible for a thread to continue doing useful
@@ -68,13 +69,21 @@ pub trait Future {
6869
///
6970
/// # Runtime characteristics
7071
///
71-
/// Futures alone are *inert*; they must be *actively* `poll`ed to make
72-
/// progress, meaning that each time the current task is woken up, it should
73-
/// actively re-`poll` pending futures that it still has an interest in.
72+
/// Futures alone are *inert*; they must be *actively* `poll`ed for the
73+
/// underlying computation to make progress, meaning that each time the
74+
/// current task is woken up, it should actively re-`poll` pending futures
75+
/// that it still has an interest in.
7476
///
75-
/// The `poll` function is not called repeatedly in a tight loop -- instead,
76-
/// it should only be called when the future indicates that it is ready to
77-
/// make progress (by calling `wake()`). If you're familiar with the
77+
/// Having said that, some Futures may represent a value that is being
78+
/// computed in a different task. In this case, the future's underlying
79+
/// computation is simply acting as a conduit for a value being computed
80+
/// by that other task, which will proceed independently of the Future.
81+
/// Futures of this kind are typically obtained when spawning a new task into an
82+
/// async runtime.
83+
///
84+
/// The `poll` function should not be called repeatedly in a tight loop --
85+
/// instead, it should only be called when the future indicates that it is
86+
/// ready to make progress (by calling `wake()`). If you're familiar with the
7887
/// `poll(2)` or `select(2)` syscalls on Unix it's worth noting that futures
7988
/// typically do *not* suffer the same problems of "all wakeups must poll
8089
/// all events"; they are more like `epoll(4)`.

core/src/num/f64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ impl f64 {
943943
/// This returns NaN when *either* argument is NaN, as opposed to
944944
/// [`f64::max`] which only returns NaN when *both* arguments are NaN.
945945
///
946-
/// ```ignore-arm-unknown-linux-gnueabihf (see https://github.com/rust-lang/rust/issues/141087)
946+
/// ```ignore-arm-unknown-linux-gnueabihf,ignore-i586 (see https://github.com/rust-lang/rust/issues/141087)
947947
/// #![feature(float_minimum_maximum)]
948948
/// let x = 1.0_f64;
949949
/// let y = 2.0_f64;
@@ -970,7 +970,7 @@ impl f64 {
970970
/// This returns NaN when *either* argument is NaN, as opposed to
971971
/// [`f64::min`] which only returns NaN when *both* arguments are NaN.
972972
///
973-
/// ```ignore-arm-unknown-linux-gnueabihf (see https://github.com/rust-lang/rust/issues/141087)
973+
/// ```ignore-arm-unknown-linux-gnueabihf,ignore-i586 (see https://github.com/rust-lang/rust/issues/141087)
974974
/// #![feature(float_minimum_maximum)]
975975
/// let x = 1.0_f64;
976976
/// let y = 2.0_f64;

core/src/primitive_docs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,11 +1083,13 @@ mod prim_str {}
10831083
/// * [`Debug`]
10841084
/// * [`Default`]
10851085
/// * [`Hash`]
1086+
/// * [`Random`]
10861087
/// * [`From<[T; N]>`][from]
10871088
///
10881089
/// [from]: convert::From
10891090
/// [`Debug`]: fmt::Debug
10901091
/// [`Hash`]: hash::Hash
1092+
/// [`Random`]: random::Random
10911093
///
10921094
/// The following traits are implemented for tuples of any length. These traits have
10931095
/// implementations that are automatically generated by the compiler, so are not limited by

core/src/ptr/non_null.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ impl<T: Sized> NonNull<T> {
9494
/// For more details, see the equivalent method on a raw pointer, [`ptr::without_provenance_mut`].
9595
///
9696
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
97-
#[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
98-
#[rustc_const_stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
97+
#[stable(feature = "nonnull_provenance", since = "1.89.0")]
98+
#[rustc_const_stable(feature = "nonnull_provenance", since = "1.89.0")]
9999
#[must_use]
100100
#[inline]
101101
pub const fn without_provenance(addr: NonZero<usize>) -> Self {
@@ -138,7 +138,7 @@ impl<T: Sized> NonNull<T> {
138138
/// For more details, see the equivalent method on a raw pointer, [`ptr::with_exposed_provenance_mut`].
139139
///
140140
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
141-
#[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
141+
#[stable(feature = "nonnull_provenance", since = "1.89.0")]
142142
#[inline]
143143
pub fn with_exposed_provenance(addr: NonZero<usize>) -> Self {
144144
// SAFETY: we know `addr` is non-zero.
@@ -269,17 +269,17 @@ impl<T: PointeeSized> NonNull<T> {
269269
}
270270

271271
/// Converts a reference to a `NonNull` pointer.
272-
#[stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
273-
#[rustc_const_stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
272+
#[stable(feature = "non_null_from_ref", since = "1.89.0")]
273+
#[rustc_const_stable(feature = "non_null_from_ref", since = "1.89.0")]
274274
#[inline]
275275
pub const fn from_ref(r: &T) -> Self {
276276
// SAFETY: A reference cannot be null.
277277
unsafe { NonNull { pointer: r as *const T } }
278278
}
279279

280280
/// Converts a mutable reference to a `NonNull` pointer.
281-
#[stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
282-
#[rustc_const_stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
281+
#[stable(feature = "non_null_from_ref", since = "1.89.0")]
282+
#[rustc_const_stable(feature = "non_null_from_ref", since = "1.89.0")]
283283
#[inline]
284284
pub const fn from_mut(r: &mut T) -> Self {
285285
// SAFETY: A mutable reference cannot be null.
@@ -335,7 +335,7 @@ impl<T: PointeeSized> NonNull<T> {
335335
/// For more details, see the equivalent method on a raw pointer, [`pointer::expose_provenance`].
336336
///
337337
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
338-
#[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
338+
#[stable(feature = "nonnull_provenance", since = "1.89.0")]
339339
pub fn expose_provenance(self) -> NonZero<usize> {
340340
// SAFETY: The pointer is guaranteed by the type to be non-null,
341341
// meaning that the address will be non-zero.

core/src/result.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,9 +1740,9 @@ impl<T, E> Result<Result<T, E>, E> {
17401740
/// assert_eq!(Ok("hello"), x.flatten().flatten());
17411741
/// ```
17421742
#[inline]
1743-
#[stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")]
1743+
#[stable(feature = "result_flattening", since = "1.89.0")]
17441744
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
1745-
#[rustc_const_stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")]
1745+
#[rustc_const_stable(feature = "result_flattening", since = "1.89.0")]
17461746
pub const fn flatten(self) -> Result<T, E> {
17471747
// FIXME(const-hack): could be written with `and_then`
17481748
match self {

core/src/slice/ascii.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl [u8] {
5252
/// Same as `to_ascii_lowercase(a) == to_ascii_lowercase(b)`,
5353
/// but without allocating and copying temporaries.
5454
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
55-
#[rustc_const_stable(feature = "const_eq_ignore_ascii_case", since = "CURRENT_RUSTC_VERSION")]
55+
#[rustc_const_stable(feature = "const_eq_ignore_ascii_case", since = "1.89.0")]
5656
#[must_use]
5757
#[inline]
5858
pub const fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool {

0 commit comments

Comments
 (0)