1
Fork 0

Auto merge of #90602 - mbartlett21:const-intoiterator, r=oli-obk

Unstably constify `impl<I: Iterator> IntoIterator for I`

This constifies the default `IntoIterator` implementation under the `const_intoiterator_identity` feature.

Tracking Issue: #90603
This commit is contained in:
bors 2022-04-23 15:41:45 +00:00
commit 6b4563bf93
4 changed files with 8 additions and 7 deletions

View file

@ -267,8 +267,9 @@ pub trait IntoIterator {
fn into_iter(self) -> Self::IntoIter;
}
#[rustc_const_unstable(feature = "const_intoiterator_identity", issue = "90603")]
#[stable(feature = "rust1", since = "1.0.0")]
impl<I: Iterator> IntoIterator for I {
impl<I: ~const Iterator> const IntoIterator for I {
type Item = I::Item;
type IntoIter = I;