Skip to content

Commit 3992cd6

Browse files
authored
Remove async_await feature (#4)
1 parent 024be65 commit 3992cd6

13 files changed

+15
-62
lines changed

README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Asynchronous stream of elements.
44

55
Provides two macros, `stream!` and `try_stream!`, allowing the caller to
66
define asynchronous streams of elements. These are implemented using `async`
7-
& `await` notation. The `stream!` macro works using only
8-
`#[feature(async_await)]`.
7+
& `await` notation. The `stream!` macro works without unstable features.
98

109
The `stream!` macro returns an anonymous type implementing the [`Stream`]
1110
trait. The `Item` associated type is the type of the values yielded from the
@@ -20,8 +19,6 @@ A basic stream yielding numbers. Values are yielded using the `yield`
2019
keyword. The stream block must return `()`.
2120

2221
```rust
23-
#![feature(async_await)]
24-
2522
use tokio::prelude::*;
2623

2724
use async_stream::stream;
@@ -46,8 +43,6 @@ async fn main() {
4643
Streams may be returned by using `impl Stream<Item = T>`:
4744

4845
```rust
49-
#![feature(async_await)]
50-
5146
use tokio::prelude::*;
5247

5348
use async_stream::stream;
@@ -75,8 +70,6 @@ async fn main() {
7570
Streams may be implemented in terms of other streams:
7671

7772
```rust
78-
#![feature(async_await)]
79-
8073
use tokio::prelude::*;
8174

8275
use async_stream::stream;
@@ -117,8 +110,6 @@ of the returned stream is `Result` with `Ok` being the value yielded and
117110
`Err` the error type returned by `?`.
118111

119112
```rust
120-
#![feature(async_await)]
121-
122113
use tokio::net::{TcpListener, TcpStream};
123114
use tokio::prelude::*;
124115

async-stream/README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Asynchronous stream of elements.
44

55
Provides two macros, `stream!` and `try_stream!`, allowing the caller to
66
define asynchronous streams of elements. These are implemented using `async`
7-
& `await` notation. The `stream!` macro works using only
8-
`#[feature(async_await)]`.
7+
& `await` notation. The `stream!` macro works without unstable features.
98

109
The `stream!` macro returns an anonymous type implementing the [`Stream`]
1110
trait. The `Item` associated type is the type of the values yielded from the
@@ -20,8 +19,6 @@ A basic stream yielding numbers. Values are yielded using the `yield`
2019
keyword. The stream block must return `()`.
2120

2221
```rust
23-
#![feature(async_await)]
24-
2522
use tokio::prelude::*;
2623

2724
use async_stream::stream;
@@ -46,8 +43,6 @@ async fn main() {
4643
Streams may be returned by using `impl Stream<Item = T>`:
4744

4845
```rust
49-
#![feature(async_await)]
50-
5146
use tokio::prelude::*;
5247

5348
use async_stream::stream;
@@ -75,8 +70,6 @@ async fn main() {
7570
Streams may be implemented in terms of other streams:
7671

7772
```rust
78-
#![feature(async_await)]
79-
8073
use tokio::prelude::*;
8174

8275
use async_stream::stream;
@@ -117,8 +110,6 @@ of the returned stream is `Result` with `Ok` being the value yielded and
117110
`Err` the error type returned by `?`.
118111

119112
```rust
120-
#![feature(async_await)]
121-
122113
use tokio::net::{TcpListener, TcpStream};
123114
use tokio::prelude::*;
124115

async-stream/examples/tcp_accept.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use async_stream::stream;
42
use futures_util::pin_mut;
53
use futures_util::stream::StreamExt;

async-stream/src/lib.rs

+1-16
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
#![feature(async_await)]
2-
31
//! Asynchronous stream of elements.
42
//!
53
//! Provides two macros, `stream!` and `try_stream!`, allowing the caller to
64
//! define asynchronous streams of elements. These are implemented using `async`
7-
//! & `await` notation. The `stream!` macro works using only
8-
//! `#[feature(async_await)]`.
5+
//! & `await` notation. The `stream!` macro works without unstable features.
96
//!
107
//! The `stream!` macro returns an anonymous type implementing the [`Stream`]
118
//! trait. The `Item` associated type is the type of the values yielded from the
@@ -20,8 +17,6 @@
2017
//! keyword. The stream block must return `()`.
2118
//!
2219
//! ```rust
23-
//! #![feature(async_await)]
24-
//!
2520
//! use tokio::prelude::*;
2621
//!
2722
//! use async_stream::stream;
@@ -46,8 +41,6 @@
4641
//! Streams may be returned by using `impl Stream<Item = T>`:
4742
//!
4843
//! ```rust
49-
//! #![feature(async_await)]
50-
//!
5144
//! use tokio::prelude::*;
5245
//!
5346
//! use async_stream::stream;
@@ -75,8 +68,6 @@
7568
//! Streams may be implemented in terms of other streams:
7669
//!
7770
//! ```rust
78-
//! #![feature(async_await)]
79-
//!
8071
//! use tokio::prelude::*;
8172
//!
8273
//! use async_stream::stream;
@@ -117,8 +108,6 @@
117108
//! `Err` the error type returned by `?`.
118109
//!
119110
//! ```rust
120-
//! #![feature(async_await)]
121-
//!
122111
//! use tokio::net::{TcpListener, TcpStream};
123112
//! use tokio::prelude::*;
124113
//!
@@ -197,8 +186,6 @@ pub mod reexport {
197186
/// # Examples
198187
///
199188
/// ```rust
200-
/// #![feature(async_await)]
201-
///
202189
/// use tokio::prelude::*;
203190
///
204191
/// use async_stream::stream;
@@ -241,8 +228,6 @@ macro_rules! stream {
241228
/// # Examples
242229
///
243230
/// ```rust
244-
/// #![feature(async_await)]
245-
///
246231
/// use tokio::net::{TcpListener, TcpStream};
247232
/// use tokio::prelude::*;
248233
///

async-stream/tests/for_await.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use tokio::prelude::*;
42

53
use async_stream::stream;

async-stream/tests/stream.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use async_stream::stream;
42

53
use futures_util::pin_mut;

async-stream/tests/try_stream.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use async_stream::try_stream;
42

53
use tokio::prelude::*;

async-stream/tests/ui/yield_in_async.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use async_stream::stream;
42

53
fn main() {
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0658]: yield syntax is experimental
2-
--> $DIR/yield_in_async.rs:8:13
2+
--> $DIR/yield_in_async.rs:6:13
33
|
4-
8 | yield 123;
4+
6 | yield 123;
55
| ^^^^^^^^^
66
|
77
= note: for more information, see https://github.com/rust-lang/rust/issues/43122
88
= help: add `#![feature(generators)]` to the crate attributes to enable
99

1010
error[E0727]: `async` generators are not yet supported
11-
--> $DIR/yield_in_async.rs:8:13
11+
--> $DIR/yield_in_async.rs:6:13
1212
|
13-
8 | yield 123;
13+
6 | yield 123;
1414
| ^^^^^^^^^
1515

1616
For more information about this error, try `rustc --explain E0658`.

async-stream/tests/ui/yield_in_closure.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use async_stream::stream;
42

53
fn main() {
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0658]: yield syntax is experimental
2-
--> $DIR/yield_in_closure.rs:9:17
2+
--> $DIR/yield_in_closure.rs:7:17
33
|
4-
9 | yield v;
4+
7 | yield v;
55
| ^^^^^^^
66
|
77
= note: for more information, see https://github.com/rust-lang/rust/issues/43122
88
= help: add `#![feature(generators)]` to the crate attributes to enable
99

1010
error[E0628]: generators cannot have explicit arguments
11-
--> $DIR/yield_in_closure.rs:8:23
11+
--> $DIR/yield_in_closure.rs:6:23
1212
|
13-
8 | .and_then(|v| {
13+
6 | .and_then(|v| {
1414
| ^^^
1515

1616
For more information about this error, try `rustc --explain E0658`.

async-stream/tests/ui/yield_in_nested_fn.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
use async_stream::stream;
42

53
fn main() {
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0658]: yield syntax is experimental
2-
--> $DIR/yield_in_nested_fn.rs:8:13
2+
--> $DIR/yield_in_nested_fn.rs:6:13
33
|
4-
8 | yield "hello";
4+
6 | yield "hello";
55
| ^^^^^^^^^^^^^
66
|
77
= note: for more information, see https://github.com/rust-lang/rust/issues/43122
88
= help: add `#![feature(generators)]` to the crate attributes to enable
99

1010
error[E0627]: yield statement outside of generator literal
11-
--> $DIR/yield_in_nested_fn.rs:8:13
11+
--> $DIR/yield_in_nested_fn.rs:6:13
1212
|
13-
8 | yield "hello";
13+
6 | yield "hello";
1414
| ^^^^^^^^^^^^^
1515

1616
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)