Skip to content

Commit 5d48a03

Browse files
committed
Auto merge of rust-lang#122947 - matthiaskrgr:rollup-10j7orh, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - rust-lang#120577 (Stabilize slice_split_at_unchecked) - rust-lang#122698 (Cancel `cargo update` job if there's no updates) - rust-lang#122780 (Rename `hir::Local` into `hir::LetStmt`) - rust-lang#122915 (Delay a bug if no RPITITs were found) - rust-lang#122916 (docs(sync): normalize dot in fn summaries) - rust-lang#122921 (Enable more mir-opt tests in debug builds) - rust-lang#122922 (-Zprint-type-sizes: print the types of awaitees and unnamed coroutine locals.) - rust-lang#122927 (Change an ICE regression test to use the original reproducer) - rust-lang#122930 (add panic location to 'panicked while processing panic') - rust-lang#122931 (Fix some typos in the pin.rs) - rust-lang#122933 (tag_for_variant follow-ups) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 41ccb13 + f44d047 commit 5d48a03

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@
190190
#![feature(ptr_metadata)]
191191
#![feature(set_ptr_value)]
192192
#![feature(slice_ptr_get)]
193-
#![feature(slice_split_at_unchecked)]
194193
#![feature(split_at_checked)]
195194
#![feature(str_internals)]
196195
#![feature(str_split_inclusive_remainder)]

core/src/panic/panic_info.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,12 @@ impl fmt::Display for PanicInfo<'_> {
161161
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
162162
formatter.write_str("panicked at ")?;
163163
self.location.fmt(formatter)?;
164+
formatter.write_str(":")?;
164165
if let Some(message) = self.message {
165-
formatter.write_str(":\n")?;
166+
formatter.write_str("\n")?;
166167
formatter.write_fmt(*message)?;
167168
} else if let Some(payload) = self.payload.downcast_ref::<&'static str>() {
168-
formatter.write_str(":\n")?;
169+
formatter.write_str("\n")?;
169170
formatter.write_str(payload)?;
170171
}
171172
// NOTE: we cannot use downcast_ref::<String>() here

core/src/pin.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
//! * e.g. [`drop`]ping the [`Future`] [^pin-drop-future]
145145
//!
146146
//! There are two possible ways to ensure the invariants required for 2. and 3. above (which
147-
//! apply to any address-sensitive type, not just self-referrential types) do not get broken.
147+
//! apply to any address-sensitive type, not just self-referential types) do not get broken.
148148
//!
149149
//! 1. Have the value detect when it is moved and update all the pointers that point to itself.
150150
//! 2. Guarantee that the address of the value does not change (and that memory is not re-used
@@ -170,7 +170,7 @@
170170
//! become viral throughout all code that interacts with the object.
171171
//!
172172
//! The second option is a viable solution to the problem for some use cases, in particular
173-
//! for self-referrential types. Under this model, any type that has an address sensitive state
173+
//! for self-referential types. Under this model, any type that has an address sensitive state
174174
//! would ultimately store its data in something like a [`Box<T>`], carefully manage internal
175175
//! access to that data to ensure no *moves* or other invalidation occurs, and finally
176176
//! provide a safe interface on top.
@@ -186,8 +186,8 @@
186186
//!
187187
//! Although there were other reason as well, this issue of expensive composition is the key thing
188188
//! that drove Rust towards adopting a different model. It is particularly a problem
189-
//! when one considers, for exapmle, the implications of composing together the [`Future`]s which
190-
//! will eventaully make up an asynchronous task (including address-sensitive `async fn` state
189+
//! when one considers, for example, the implications of composing together the [`Future`]s which
190+
//! will eventually make up an asynchronous task (including address-sensitive `async fn` state
191191
//! machines). It is plausible that there could be many layers of [`Future`]s composed together,
192192
//! including multiple layers of `async fn`s handling different parts of a task. It was deemed
193193
//! unacceptable to force indirection and allocation for each layer of composition in this case.
@@ -359,7 +359,7 @@
359359
//! Builtin types that are [`Unpin`] include all of the primitive types, like [`bool`], [`i32`],
360360
//! and [`f32`], references (<code>[&]T</code> and <code>[&mut] T</code>), etc., as well as many
361361
//! core and standard library types like [`Box<T>`], [`String`], and more.
362-
//! These types are marked [`Unpin`] because they do not have an ddress-sensitive state like the
362+
//! These types are marked [`Unpin`] because they do not have an address-sensitive state like the
363363
//! ones we discussed above. If they did have such a state, those parts of their interface would be
364364
//! unsound without being expressed through pinning, and they would then need to not
365365
//! implement [`Unpin`].
@@ -953,7 +953,7 @@ use crate::{
953953
/// discussed below.
954954
///
955955
/// We call such a [`Pin`]-wrapped pointer a **pinning pointer** (or pinning ref, or pinning
956-
/// [`Box`], etc.) because its existince is the thing that is pinning the underlying pointee in
956+
/// [`Box`], etc.) because its existence is the thing that is pinning the underlying pointee in
957957
/// place: it is the metaphorical "pin" securing the data in place on the pinboard (in memory).
958958
///
959959
/// It is important to stress that the thing in the [`Pin`] is not the value which we want to pin
@@ -962,7 +962,7 @@ use crate::{
962962
///
963963
/// The most common set of types which require pinning related guarantees for soundness are the
964964
/// compiler-generated state machines that implement [`Future`] for the return value of
965-
/// `async fn`s. These compiler-generated [`Future`]s may contain self-referrential pointers, one
965+
/// `async fn`s. These compiler-generated [`Future`]s may contain self-referential pointers, one
966966
/// of the most common use cases for [`Pin`]. More details on this point are provided in the
967967
/// [`pin` module] docs, but suffice it to say they require the guarantees provided by pinning to
968968
/// be implemented soundly.

core/src/slice/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,8 +1944,6 @@ impl<T> [T] {
19441944
/// # Examples
19451945
///
19461946
/// ```
1947-
/// #![feature(slice_split_at_unchecked)]
1948-
///
19491947
/// let v = [1, 2, 3, 4, 5, 6];
19501948
///
19511949
/// unsafe {
@@ -1966,7 +1964,7 @@ impl<T> [T] {
19661964
/// assert_eq!(right, []);
19671965
/// }
19681966
/// ```
1969-
#[unstable(feature = "slice_split_at_unchecked", reason = "new API", issue = "76014")]
1967+
#[stable(feature = "slice_split_at_unchecked", since = "CURRENT_RUSTC_VERSION")]
19701968
#[rustc_const_stable(feature = "const_slice_split_at_unchecked", since = "1.77.0")]
19711969
#[inline]
19721970
#[must_use]
@@ -2008,8 +2006,6 @@ impl<T> [T] {
20082006
/// # Examples
20092007
///
20102008
/// ```
2011-
/// #![feature(slice_split_at_unchecked)]
2012-
///
20132009
/// let mut v = [1, 0, 3, 0, 5, 6];
20142010
/// // scoped to restrict the lifetime of the borrows
20152011
/// unsafe {
@@ -2021,7 +2017,7 @@ impl<T> [T] {
20212017
/// }
20222018
/// assert_eq!(v, [1, 2, 3, 4, 5, 6]);
20232019
/// ```
2024-
#[unstable(feature = "slice_split_at_unchecked", reason = "new API", issue = "76014")]
2020+
#[stable(feature = "slice_split_at_unchecked", since = "CURRENT_RUSTC_VERSION")]
20252021
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
20262022
#[inline]
20272023
#[must_use]

std/src/panicking.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,13 @@ fn rust_panic_with_hook(
746746
panic_count::MustAbort::PanicInHook => {
747747
// Don't try to print the message in this case
748748
// - perhaps that is causing the recursive panics.
749-
rtprintpanic!("thread panicked while processing panic. aborting.\n");
749+
let panicinfo = PanicInfo::internal_constructor(
750+
None, // no message
751+
location, // but we want to show the location!
752+
can_unwind,
753+
force_no_backtrace,
754+
);
755+
rtprintpanic!("{panicinfo}\nthread panicked while processing panic. aborting.\n");
750756
}
751757
panic_count::MustAbort::AlwaysAbort => {
752758
// Unfortunately, this does not print a backtrace, because creating

std/src/sync/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ impl<T: ?Sized> Mutex<T> {
396396
self.poison.get()
397397
}
398398

399-
/// Clear the poisoned state from a mutex
399+
/// Clear the poisoned state from a mutex.
400400
///
401401
/// If the mutex is poisoned, it will remain poisoned until this function is called. This
402402
/// allows recovering from a poisoned state and marking that it has recovered. For example, if

std/src/sync/rwlock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ impl<T: ?Sized> RwLock<T> {
439439
self.poison.get()
440440
}
441441

442-
/// Clear the poisoned state from a lock
442+
/// Clear the poisoned state from a lock.
443443
///
444444
/// If the lock is poisoned, it will remain poisoned until this function is called. This allows
445445
/// recovering from a poisoned state and marking that it has recovered. For example, if the

0 commit comments

Comments
 (0)