From 88bd1913f2804c9204b72f60b61aad4449d832c3 Mon Sep 17 00:00:00 2001 From: Noa Date: Thu, 17 Apr 2025 11:37:54 -0500 Subject: [PATCH 1/2] Point UNIX_EPOCH to associated constant in SystemTime docs --- library/std/src/time.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 5ab71413586..6e28596e79b 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -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); From 34573d683f604ce4d1ab9a845c5a8be4a587a91d Mon Sep 17 00:00:00 2001 From: Noa Date: Thu, 17 Apr 2025 11:42:53 -0500 Subject: [PATCH 2/2] Be more specific about the error in the SystemTime example --- library/std/src/time.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 6e28596e79b..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:?}"); /// } /// } /// }