about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-18 16:23:32 +0100
committerGitHub <noreply@github.com>2022-02-18 16:23:32 +0100
commitf1c918f1f3166c1cb2624ce2e2783d357e70dc3d (patch)
treef3709578093816760ea98b736d4c9b75af870f2a /library/alloc/src
parentcf3cd4c48a44ba833253a1f32e09bd6d7b120e13 (diff)
parent18130a21dc8744c9a1f734016e0b399d70e8f968 (diff)
downloadrust-f1c918f1f3166c1cb2624ce2e2783d357e70dc3d.tar.gz
rust-f1c918f1f3166c1cb2624ce2e2783d357e70dc3d.zip
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
Move `{core,std}::stream::Stream` to `{core,std}::async_iter::AsyncIterator`

Following amendments in https://github.com/rust-lang/rfcs/pull/3208/.

cc #79024
cc ``@yoshuawuyts`` ``@joshtriplett``
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/boxed.rs6
-rw-r--r--library/alloc/src/lib.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index aa7344ba405..68bf59a01b3 100644
--- a/library/alloc/src/boxed.rs
+++ b/library/alloc/src/boxed.rs
@@ -133,6 +133,7 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 
 use core::any::Any;
+use core::async_iter::AsyncIterator;
 use core::borrow;
 use core::cmp::Ordering;
 use core::convert::{From, TryFrom};
@@ -149,7 +150,6 @@ use core::ops::{
 };
 use core::pin::Pin;
 use core::ptr::{self, Unique};
-use core::stream::Stream;
 use core::task::{Context, Poll};
 
 #[cfg(not(no_global_oom_handling))]
@@ -1992,8 +1992,8 @@ where
     }
 }
 
-#[unstable(feature = "async_stream", issue = "79024")]
-impl<S: ?Sized + Stream + Unpin> Stream for Box<S> {
+#[unstable(feature = "async_iterator", issue = "79024")]
+impl<S: ?Sized + AsyncIterator + Unpin> AsyncIterator for Box<S> {
     type Item = S::Item;
 
     fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index ce75859f963..6da32df57ef 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -91,7 +91,7 @@
 #![feature(array_chunks)]
 #![feature(array_methods)]
 #![feature(array_windows)]
-#![feature(async_stream)]
+#![feature(async_iterator)]
 #![feature(coerce_unsized)]
 #![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
 #![feature(const_box)]