Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMove Duration to libcore (and remove deprecated Duration::span) #30594
Conversation
rust-highfive
assigned
brson
Dec 28, 2015
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
SimonSapin
force-pushed the
SimonSapin:core-duration
branch
2 times, most recently
from
acdfd75
to
cb09b5e
Dec 28, 2015
This comment has been minimized.
This comment has been minimized.
|
cc @rust-lang/libs |
This comment has been minimized.
This comment has been minimized.
|
Travis failure: https://travis-ci.org/rust-lang/rust/builds/99159735#L6416 I'm tentatively on board with this, but since libcore is stable now, we'll have to make sure we'll never want to add functionality that libcore can't support. |
This comment has been minimized.
This comment has been minimized.
|
It seems like it would be nice to have |
SimonSapin
force-pushed the
SimonSapin:core-duration
branch
from
cb09b5e
to
601e52d
Dec 29, 2015
This comment has been minimized.
This comment has been minimized.
|
Pushed a fix, |
This comment has been minimized.
This comment has been minimized.
This (having different set of functionality in core vs std for the same type) is not specific to For |
This comment has been minimized.
This comment has been minimized.
|
I think Travis is stuck in a loop. I pushed hours ago and it’s now showing "Elapsed time 11 min 19 sec", but it was 20 minutes or so earlier. |
This comment has been minimized.
This comment has been minimized.
|
|
SimonSapin
added some commits
Dec 28, 2015
SimonSapin
force-pushed the
SimonSapin:core-duration
branch
from
601e52d
to
ac249c1
Dec 30, 2015
This comment has been minimized.
This comment has been minimized.
It's applicable to whatever types we like, but not something anyone has much of an appetite for doing. We did it for primitive types primarily because you hit them so early when learning Rust that extension traits seemed really problematic. I agree with @huonw that ideally we'd have it unstable in |
This comment has been minimized.
This comment has been minimized.
|
Re stability: sounds reasonable. I’ve pushed a commit that I think does this. |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin Can you add a test for stability in |
This comment has been minimized.
This comment has been minimized.
|
I think that lots of stability portions in the compiler don't expect a stable type with an unstable parent so it may not work out in terms of ensuring all usage through libcore is gated. For example all the method usage will be stable in libcore, it's just the module itself that's unstable. (which I forget how it affects the stability checking of a path like |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
I'm going to flag for libs team discussion. |
aturon
added
I-nominated
T-libs
labels
Jan 19, 2016
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this PR during triage today, and the conclusion was to close this for now. Currently we think that moving a type from std to libcore needs motivation aside from "it can be done", as there are stabilization ramifications to moving into libcore rather than sticking with std (e.g. it's much harder to add functionality that requires std). It was also brought up that this may not be too useful as the only member of |
SimonSapin commentedDec 28, 2015
The
Duration::spanremoval will hit stable in 1.7 at the soonest, while 1.6 already has the deprecation warning.