Skip to content

Commit 6515eb8

Browse files
committed
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
2 parents 870c82c + bdd17c6 commit 6515eb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/iter/traits/collect.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ pub trait IntoIterator {
267267
fn into_iter(self) -> Self::IntoIter;
268268
}
269269

270+
#[rustc_const_unstable(feature = "const_intoiterator_identity", issue = "90603")]
270271
#[stable(feature = "rust1", since = "1.0.0")]
271-
impl<I: Iterator> IntoIterator for I {
272+
impl<I: ~const Iterator> const IntoIterator for I {
272273
type Item = I::Item;
273274
type IntoIter = I;
274275

0 commit comments

Comments
 (0)