diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-03-27 12:32:06 +0100 |
|---|---|---|
| committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-03-27 12:32:06 +0100 |
| commit | f2649cb9613e14a5737334b264f1c0d6cdbfde60 (patch) | |
| tree | f8121000a9f447b07c71cd0ecd5174b13de312b6 /library/std/src/time.rs | |
| parent | 7a0600714ab1a4cb2d1a88cd0660b9f9a2c07309 (diff) | |
| download | rust-f2649cb9613e14a5737334b264f1c0d6cdbfde60.tar.gz rust-f2649cb9613e14a5737334b264f1c0d6cdbfde60.zip | |
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.
Diffstat (limited to 'library/std/src/time.rs')
| -rw-r--r-- | library/std/src/time.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 5c2e9da70fb..1aa98436ef6 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -461,6 +461,9 @@ impl fmt::Debug for Instant { impl SystemTime { /// An anchor in time which can be used to create new `SystemTime` instances or /// learn about where in time a `SystemTime` lies. + // + // NOTE! this documentation is duplicated, here and in std::time::UNIX_EPOCH. + // The two copies are not quite identical, because of the difference in naming. /// /// This constant is defined to be "1970-01-01 00:00:00 UTC" on all systems with /// respect to the system clock. Using `duration_since` on an existing @@ -617,6 +620,9 @@ impl fmt::Debug for SystemTime { /// An anchor in time which can be used to create new `SystemTime` instances or /// learn about where in time a `SystemTime` lies. +// +// NOTE! this documentation is duplicated, here and in SystemTime::UNIX_EPOCH. +// The two copies are not quite identical, because of the difference in naming. /// /// This constant is defined to be "1970-01-01 00:00:00 UTC" on all systems with /// respect to the system clock. Using `duration_since` on an existing |
