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 upChange trait RangeArgument to struct RangeBounds. #43033
Conversation
rust-highfive
assigned
BurntSushi
Jul 3, 2017
This comment has been minimized.
This comment has been minimized.
|
r? @BurntSushi (rust_highfive has picked a reviewer for you, use r? to override) |
clarfon
force-pushed the
clarfon:range_bounds
branch
4 times, most recently
from
5e55907
to
fbd095d
Jul 3, 2017
This comment has been minimized.
This comment has been minimized.
|
Hi @clarcharr, looks like there has been a bunch of CI failures like
Is this PR still a work in progress (per your original comment)? |
aidanhs
added
the
S-waiting-on-author
label
Jul 5, 2017
This comment has been minimized.
This comment has been minimized.
|
It is! I'll get back to this today or tomorrow. |
This comment has been minimized.
This comment has been minimized.
|
|
brson
added
the
beta-nominated
label
Jul 8, 2017
This comment has been minimized.
This comment has been minimized.
|
This needs to land, and backport, within a week or not at all. It is slated for stabilization on 7/20. I am not crazy about making API changes at the last minute as this does. A rename - ok (sorta...), but changing how the API works seems unnecessarily risky. The stabilization of this API is in this backport. |
This comment has been minimized.
This comment has been minimized.
|
I'm a bit confused about the API change, honestly. I see it was suggested #30877 (comment) but there wasn't much discussion. There was consensus around a rename though, but it seems weird to rush the other change -- and why would we backport it for a release before basically anyone has a chance to try it on nightly? Maybe there is more context that I missed? |
This comment has been minimized.
This comment has been minimized.
|
OK, I looked a little more closely at the situation.
This PR changes the name and implements the Based on that contradiction it seems to me that we haven't agreed on the design of this feature. Should we just revert the stabilization for now? |
This comment has been minimized.
This comment has been minimized.
|
Nothing related to this is being stabilized AFAIK. |
This comment has been minimized.
This comment has been minimized.
|
@brson I should clarify that this is absolutely not expected to stabilise soon. The intention was to offer an implementation of the If the team would prefer to leave |
This comment has been minimized.
This comment has been minimized.
I think so. |
This comment has been minimized.
This comment has been minimized.
|
So I'm not clear what the status of this is. I don't think we're backporting this to beta at this point (it's too late). |
This comment has been minimized.
This comment has been minimized.
|
There's no need to beta backport this - RangeArgument was un-stabilized. This does seem like a reasonable way forward though. r=me with a rebase! |
sfackler
removed
the
beta-nominated
label
Jul 19, 2017
ollie27
reviewed
Jul 19, 2017
| /// An intermediate trait for specialization of `Extend`. | ||
| #[doc(hidden)] | ||
| trait SpecExtend<I: IntoIterator> { | ||
| /// Extends `self` with the contents of the given iterator. | ||
| fn spec_extend(&mut self, iter: I); | ||
| } | ||
|
|
||
| #[rustc_deprecated(reason = "moved to core::ops", since = "1.19.0")] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -11,142 +11,7 @@ | |||
| #![unstable(feature = "collections_range", | |||
| reason = "waiting for dust to settle on inclusive ranges", | |||
| issue = "30877")] | |||
| #![rustc_deprecated(reason = "moved to core::ops", since = "1.19.0")] | |||
This comment has been minimized.
This comment has been minimized.
ollie27
Jul 19, 2017
Contributor
As this module only contained RangeArgument and that's been removed, this entire module can just be deleted along with its reexports in collections and std::collections.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
pign @clarcharr, just wanted to make sure this stayed on your radar |
This comment has been minimized.
This comment has been minimized.
|
@clarcharr I'm going to close this to keep the queue clean, but if you manage to get back to this to rebase let us know and we'll reopen! |
clarfon commentedJul 3, 2017
•
edited
This follows from the discussion in #30877. This removes the
RangeArgumenttrait in favour of theRangeBoundsstruct, whereRangeArgument<T>is loosely translated toInto<RangeBounds<T>>.I'm still working on testing this but I'll upload the PR now and see how people feel.
Additionally, I was going to at some point refactor the code for dealing with ranges of
usizeinto methods onRangeBounds<usize>. That isn't blocking on this commit, but it's something that should be done at some point.