Skip to content

Conversation

sfackler
Copy link
Member

It's not very discoverable as a separate const in the module.

r? @alexcrichton

@alexcrichton
Copy link
Member

r=me with an unstable tracking issue

It's not very discoverable as a separate const in the module.
@sfackler sfackler force-pushed the unix-epoch-assoc-const branch from a910847 to dfde231 Compare March 30, 2018 10:44
@sfackler
Copy link
Member Author

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Mar 30, 2018

📌 Commit dfde231 has been approved by alexcrichton

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 30, 2018
@kennytm
Copy link
Member

kennytm commented Mar 30, 2018

@bors r-

Failed a doc-test.

[01:15:04] ---- time.rs - time::SystemTime::UNIX_EPOCH (line 273) stdout ----
[01:15:04] 	error[E0658]: use of unstable library feature 'assoc_unix_epoch' (see issue #49502)
[01:15:04]  --> time.rs:276:40
[01:15:04]   |
[01:15:04] 6 | match SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) {
[01:15:04]   |                                        ^^^^^^^^^^^^^^^^^^^^^^
[01:15:04]   |
[01:15:04]   = help: add #![feature(assoc_unix_epoch)] to the crate attributes to enable
[01:15:04] 
[01:15:04] thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:296:13
[01:15:04] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:15:04] 
[01:15:04] 
[01:15:04] failures:
[01:15:04]     time.rs - time::SystemTime::UNIX_EPOCH (line 273)
[01:15:04] 
[01:15:04] test result: FAILED. 921 passed; 1 failed; 20 ignored; 0 measured; 0 filtered out

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 30, 2018
/// # Examples
///
/// ```no_run
/// use std::time::SystemTime;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add #![feature(assoc_unix_epoch)] above this.

@kennytm
Copy link
Member

kennytm commented Mar 30, 2018

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Mar 30, 2018

📌 Commit df2e238 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 30, 2018
@bors
Copy link
Collaborator

bors commented Mar 31, 2018

⌛ Testing commit df2e238 with merge e38eca6...

bors added a commit that referenced this pull request Mar 31, 2018
Make UNIX_EPOCH an associated constant of SystemTime

It's not very discoverable as a separate const in the module.

r? @alexcrichton
@bors
Copy link
Collaborator

bors commented Mar 31, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing e38eca6 to master...

@bors bors merged commit df2e238 into rust-lang:master Mar 31, 2018
@sfackler sfackler deleted the unix-epoch-assoc-const branch March 31, 2018 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants