-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std: Deprecate a number of unstable features #26914
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
r? @aturon cc @rust-lang/libs |
@@ -2448,6 +2459,8 @@ impl<I> Fuse<I> { | |||
/// previously returned `None`. | |||
#[inline] | |||
#[unstable(feature = "iter_reset_fuse", reason = "seems marginal")] | |||
#[deprecated(since = "1.3.0", | |||
reason = "unusual for adaptors to have one-off methods")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unusual comment :-) I don't disagree with the deprecation, but I'd like to add a method to fuse, to query its fused/nonfused state, it would be quite useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree: the problem here isn't the one-off-ness per se, but rather that this method doesn't seem terribly useful in practice.
d851cce
to
136bc80
Compare
@@ -401,6 +401,7 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T { | |||
/// ``` | |||
#[inline] | |||
#[unstable(feature = "cmp_partial")] | |||
#[deprecated(since = "1.3.0", reason = "has not proven itself worthwhile")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only deprecates partial_min
, but not partial_max
. Are you sure that’s not an oversight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thanks!
I have no complaints about scope of this PR 😊 |
136bc80
to
012f993
Compare
☔ The latest upstream changes (presumably #27215) made this pull request unmergeable. Please resolve the merge conflicts. |
012f993
to
19e9951
Compare
19e9951
to
ef225d4
Compare
☔ The latest upstream changes (presumably #26870) made this pull request unmergeable. Please resolve the merge conflicts. |
53e662e
to
a1227e8
Compare
I'd like to keep position elem. We want this functionality in some form (I imagine something like |
@@ -86,10 +86,13 @@ use core::raw::{TraitObject}; | |||
#[lang = "exchange_heap"] | |||
#[unstable(feature = "box_heap", | |||
reason = "may be renamed; uncertain about custom allocator design")] | |||
#[allow(deprecated)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @pnkfelix -- can you comment on whether we may still want this constant with the upcoming box/allocator system?
r=me modulo nits. |
@bluss perhaps, yeah, but I'd prefer to keep the scope of this PR to just deprecate items instead of adding and/or renaming new APIs. |
@bors: r=aturon a1227e87c96c3e083467b8c5fb373b09c0f38e6c |
⌛ Testing commit a1227e8 with merge be324ca... |
💔 Test failed - auto-win-gnu-32-nopt-t |
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
a1227e8
to
b3aa1a6
Compare
@bors: r=aturon On Mon, Jul 27, 2015 at 4:38 PM, bors notifications@github.com wrote:
|
📌 Commit b3aa1a6 has been approved by |
@@ -1627,6 +1630,7 @@ impl<T> IntoIter<T> { | |||
#[inline] | |||
/// Drops all items that have not yet been moved and returns the empty vector. | |||
#[unstable(feature = "iter_to_vec")] | |||
#[deprecated(since = "1.3.0", reason = "replaced by drain()")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this is replaced by drain, it may in fact be very useful (I'd use it in itertools if it were stable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this isn't replaced by Drain -- in particular IntoIter allows you to return the Vec up and transport it around -- Drain doesn't. Still, this seems fairly marginal for today's std.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but I believe that this was originally added to get back the original allocation, in which case drain
suffices for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for every use case, for example not for GroupByLazy, which would like to recycle allocations of the IntoIters it uses.
@alexcrichton You don't need to rename it, I just suggested not deprecating position_elem yet. |
Possibly, yeah, but it's slated to be deprecated soon anyway so it doesn't seem too bad to just go ahead and do so. |
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * box_heap * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
@@ -590,6 +590,8 @@ impl ExactSizeIterator for ArgsOs { | |||
|
|||
/// Returns the page size of the current architecture in bytes. | |||
#[unstable(feature = "page_size", reason = "naming and/or location may change")] | |||
#[deprecated(since = "1.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used by coroutine-rs, would be nice to provide this somewhere since it's os specific and non-trivial to obtain.
Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are: