-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: Mark the IntoIterator
trait as stable
#21853
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
r? @aturon |
* Display::fmt is stable * Debug::fmt is stable * FromIterator::from_iter is stable * Peekable::peek is stable
This commit marks the trait `IntoIterator` as well as the associated type `Iter` and method `into_iter` all as stable.
54dd16b
to
2d78822
Compare
I have two worries here. First, I think the Second, I think we may want to add an pub trait IntoIterator {
type Item;
type Iter: Iterator<Item = Self::Item>;
...
} That will make it much easier to bound over the item type of the trait. It imposes a slight ergonomic burden on implementors, but once default associated types land we should be able to remove that burden. cc @japaric |
Is stabalizing these not a bit premature? We litterally just landed them. |
Sounds good to me, since you almost always want to bind (1) (I wonder if we could allow
Yes, I think that default type params would let us remove
If we are going to add |
Ok, I've moved the missing stability attributes to #21870 and otherwise the desired definition of
I agree that these haven't been around for awhile, but this also means that you cannot use a |
This commit marks the trait
IntoIterator
as well as the associated typeIter
and method
into_iter
all as stable.This also fixes up some missing stability on some other assorted traits.