Skip to content

Commit f2649cb

Browse files
committed
Add note about clone-and-hack to the two UNIX_EPOCH definitions
I edited one of these and looked at the formatted docs for the other. This confused me for a while; I suspected a build system bug. I don't see an easy and neat way to unify these. So let's just document it instead.
1 parent 7a06007 commit f2649cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/time.rs

+6
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ impl fmt::Debug for Instant {
461461
impl SystemTime {
462462
/// An anchor in time which can be used to create new `SystemTime` instances or
463463
/// learn about where in time a `SystemTime` lies.
464+
//
465+
// NOTE! this documentation is duplicated, here and in std::time::UNIX_EPOCH.
466+
// The two copies are not quite identical, because of the difference in naming.
464467
///
465468
/// This constant is defined to be "1970-01-01 00:00:00 UTC" on all systems with
466469
/// respect to the system clock. Using `duration_since` on an existing
@@ -617,6 +620,9 @@ impl fmt::Debug for SystemTime {
617620

618621
/// An anchor in time which can be used to create new `SystemTime` instances or
619622
/// learn about where in time a `SystemTime` lies.
623+
//
624+
// NOTE! this documentation is duplicated, here and in SystemTime::UNIX_EPOCH.
625+
// The two copies are not quite identical, because of the difference in naming.
620626
///
621627
/// This constant is defined to be "1970-01-01 00:00:00 UTC" on all systems with
622628
/// respect to the system clock. Using `duration_since` on an existing

0 commit comments

Comments
 (0)