about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-21 16:14:10 +0000
committerbors <bors@rust-lang.org>2025-04-21 16:14:10 +0000
commit8f2819b0e3428d0aee05fa60e91e0211c2aea053 (patch)
tree8319a2108ee04851fcec93d82f74f798453677eb /library/std/src
parentc8f94230282a8e8c1148f3e657f0199aad909228 (diff)
parent77325f5200097718ac87863c96388c15efc3a629 (diff)
downloadrust-8f2819b0e3428d0aee05fa60e91e0211c2aea053.tar.gz
rust-8f2819b0e3428d0aee05fa60e91e0211c2aea053.zip
Auto merge of #140122 - ChrisDenton:rollup-qsj6xu0, r=ChrisDenton
Rollup of 8 pull requests

Successful merges:

 - #139946 (fix missing word in comment)
 - #139982 (SystemTime doc tweaks)
 - #140009 (docs(LocalKey<T>): clarify that T's Drop shouldn't panic)
 - #140021 (Don't ICE on pending obligations from deep normalization in a loop)
 - #140029 (Relocate tests in `tests/ui`)
 - #140030 (Fix autodiff debug builds)
 - #140120 (Use `output_base_dir` for `mir_dump_dir`)
 - #140121 (Document why CodeStats::type_sizes is public)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/rt.rs2
-rw-r--r--library/std/src/thread/local.rs6
-rw-r--r--library/std/src/time.rs5
3 files changed, 9 insertions, 4 deletions
diff --git a/library/std/src/rt.rs b/library/std/src/rt.rs
index 3a22a16cb16..9737b2f5bfe 100644
--- a/library/std/src/rt.rs
+++ b/library/std/src/rt.rs
@@ -46,7 +46,7 @@ macro_rules! rtprintpanic {
 macro_rules! rtabort {
     ($($t:tt)*) => {
         {
-            rtprintpanic!("fatal runtime error: {}\n", format_args!($($t)*));
+            rtprintpanic!("fatal runtime error: {}, aborting\n", format_args!($($t)*));
             crate::sys::abort_internal();
         }
     }
diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs
index d5a5d10205d..7cd44873313 100644
--- a/library/std/src/thread/local.rs
+++ b/library/std/src/thread/local.rs
@@ -22,12 +22,16 @@ use crate::fmt;
 ///
 /// Initialization is dynamically performed on the first call to a setter (e.g.
 /// [`with`]) within a thread, and values that implement [`Drop`] get
-/// destructed when a thread exits. Some caveats apply, which are explained below.
+/// destructed when a thread exits. Some platform-specific caveats apply, which
+/// are explained below.
+/// Note that, should the destructor panics, the whole process will be [aborted].
 ///
 /// A `LocalKey`'s initializer cannot recursively depend on itself. Using a
 /// `LocalKey` in this way may cause panics, aborts or infinite recursion on
 /// the first call to `with`.
 ///
+/// [aborted]: crate::process::abort
+///
 /// # Single-thread Synchronization
 ///
 /// Though there is no potential race with other threads, it is still possible to
diff --git a/library/std/src/time.rs b/library/std/src/time.rs
index 5ab71413586..03af35e809c 100644
--- a/library/std/src/time.rs
+++ b/library/std/src/time.rs
@@ -205,8 +205,8 @@ pub struct Instant(time::Instant);
 ///            println!("{}", elapsed.as_secs());
 ///        }
 ///        Err(e) => {
-///            // an error occurred!
-///            println!("Error: {e:?}");
+///            // the system clock went backwards!
+///            println!("Great Scott! {e:?}");
 ///        }
 ///    }
 /// }
@@ -245,6 +245,7 @@ pub struct Instant(time::Instant);
 /// > structure cannot represent the new point in time.
 ///
 /// [`add`]: SystemTime::add
+/// [`UNIX_EPOCH`]: SystemTime::UNIX_EPOCH
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 #[stable(feature = "time2", since = "1.8.0")]
 pub struct SystemTime(time::SystemTime);