about summary refs log tree commit diff
diff options
context:
space:
mode:
authormbartlett21 <mjmouse9999@gmail.com>2022-03-15 06:07:18 +0000
committermbartlett21 <mjmouse9999@gmail.com>2022-03-15 06:07:18 +0000
commit91eda96e38a6244d82e3a9dad65b19048e2462df (patch)
tree67f49721e36b886ebb81665f7d7b39070a7305b8
parent984204814e00f60c5e1ec99e2e184f326782a586 (diff)
downloadrust-91eda96e38a6244d82e3a9dad65b19048e2462df.tar.gz
rust-91eda96e38a6244d82e3a9dad65b19048e2462df.zip
Unstably constify `impl IntoIterator for I: ~const Iterator`
-rw-r--r--library/core/src/iter/traits/collect.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/iter/traits/collect.rs b/library/core/src/iter/traits/collect.rs
index 7b75ab96ee7..e6900742c31 100644
--- a/library/core/src/iter/traits/collect.rs
+++ b/library/core/src/iter/traits/collect.rs
@@ -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;