std: Mark the IntoIterator trait as stable#21853
std: Mark the IntoIterator trait as stable#21853alexcrichton wants to merge 2 commits intorust-lang:masterfrom
IntoIterator trait as stable#21853Conversation
|
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 |
…ract-util internal: extract default_fill_expr to utils
This commit marks the trait
IntoIteratoras well as the associated typeIterand method
into_iterall as stable.This also fixes up some missing stability on some other assorted traits.