-
Notifications
You must be signed in to change notification settings - Fork 14k
Final pre-alpha stabilization of: iter, ops, slice, collections #20560
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
Conversation
|
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
|
(We should probably wait to land this until we've had a chance to discuss |
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.
Any notes on this call?
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.
Don't read anything into the #[stable] here other than: if we have Weak, we'll keep the Drop impl.
c11d268 to
ee5109b
Compare
|
@gankro pushed a revision marking the correct |
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 seems slightly odd to still have a type parameter now that Item is an associated type, but I suppose T: Iterator doesn't tell you much and you need to write down the Item type somewhere.
Just confirming.
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 desired to allow types to be created (or extended) via iterators from multiple items. For example, String can be extended by char or &str iterators.
|
This looks great to me, this is all really falling into place! |
|
Also should we explicitly mark the other modules as |
|
This should also add |
This commit wraps up the adjustments to the iterator for recent language changes. * Moves `rposition` from `ExactSizeIterator` to `IteratorExt` using a `where` clause, thereby removing the `ExactSizeIterator: DoubleEndedIterator` constraint. * Merges `MutableDoubleEndedIterator` into `IteratorExt`, renaming `reverse_` to `reverse_in_place`. * Merges `IteratorOrdExt`, `IteratorCloneExt` and `CloneIteratorExt` into `IteratorExt` using `where` clauses. Marks as `#[stable]`: * the `iter` module itself * `FromIterator`, `Extend` * `Iterator`, `IteratorExt` * `map` * `filter` * `filter_map` * `skip_while` * `take_while` * `scan` * `flat_map` * `inspect` * `collect` * `fold` * `all` * `any` * `find` * `rposition` * `max`, `min` * Various adapter types related to the above methods Because of the trait merging, this is a: [breaking-change]
This commit marks as stable those parts of `core::ops` that are in their final planned form: `Drop`, all of the mathematical operators (`Add`, `Sub`, etc), `Deref`/`DerefMut`. It leaves the `Index*`, `Slice*` and `Fn*` traits unstable, as they are still undergoing active changes.
ee5109b to
5371ae2
Compare
Marks as `#[stable]`: * Various iterator structs for stable methods, e.g. `Chunks` and `Windows`. * The `SliceExt` trait itself.
The earlier collections stabilization did not cover the modules themselves. This commit marks as stable those modules whose types have been stabilized.
|
@alexcrichton updated. After a bunch of discussion on the topic, I think we should move forward stabilizing |
|
Looks like rust-installer was reverted, but r=me otherwise |
|
I hate submodules 💢 |
5371ae2 to
c6f4a03
Compare
Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
c6f4a03 to
107fe6e
Compare
|
Landed in #20610 |
…s-improve fix: Add progress bars to more places in analysis-stats
Now that various language features have been rolled out and RFCs implemented, this PR takes a final stabilization pass over
iter,ops,sliceandcollections.Commit summaries copied below:
Final alpha stabilization of core::iter
This commit wraps up the adjustments to the iterator for recent language
changes.
rpositionfromExactSizeIteratortoIteratorExtusing awhereclause, thereby removing theExactSizeIterator: DoubleEndedIteratorconstraint.MutableDoubleEndedIteratorintoIteratorExt, renamingreverse_toreverse_in_place.IteratorOrdExt,IteratorCloneExtandCloneIteratorExtinto
IteratorExtusingwhereclauses.Marks as
#[stable]:itermodule itselfFromIterator,ExtendIterator,IteratorExtmapfilterfilter_mapskip_whiletake_whilescanflat_mapinspectcollectfoldallanyfindrpositionmax,minBecause of the trait merging, this is a:
[breaking-change]
Stabilize core::ops
This commit marks as stable those parts of
core::opsthat are in theirfinal planned form:
Drop, all of the mathematical operators (Add,Sub, etc),Deref/DerefMut. It leaves theIndex*,Slice*andFn*traits unstable, as they are still undergoing active changes.Final alpha stabilization of std::slice
Marks as
#[stable]:ChunksandWindows.SliceExttrait itself.Stabilize collection modules
The earlier collections stabilization did not cover the modules
themselves. This commit marks as stable those modules whose types have
been stabilized.
Stabilization of impls and fallout from stabilization
Stabilizes
impls of now-stable traits.