Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.

Commit edddaa4

Browse files
authored
Remove async_await feature (#99)
1 parent aa2e17d commit edddaa4

File tree

26 files changed

+4
-71
lines changed

26 files changed

+4
-71
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ asynchronous software.
6969
## Examples
7070
__UDP Echo Server__
7171
```rust
72-
#![feature(async_await)]
73-
7472
use runtime::net::UdpSocket;
7573

7674
#[runtime::main]

benches/baseline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(test, async_await)]
1+
#![feature(test)]
22

33
extern crate test;
44

benches/native.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(test, async_await)]
1+
#![feature(test)]
22
#![warn(rust_2018_idioms)]
33

44
extern crate test;

benches/tokio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(test, async_await)]
1+
#![feature(test)]
22
#![warn(rust_2018_idioms)]
33

44
extern crate test;

examples/guessing.rs

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//! $ nc localhost 8080
88
//! ```
99
10-
#![feature(async_await)]
11-
1210
use futures::prelude::*;
1311
use rand::Rng;
1412
use runtime::net::{TcpListener, TcpStream};

examples/hello.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
async fn say_hi() {
42
println!("Hello world! 🤖");
53
}

examples/tcp-client.rs

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//! $ cargo run --example tcp-echo
77
//! ```
88
9-
#![feature(async_await)]
10-
119
use futures::prelude::*;
1210
use runtime::net::TcpStream;
1311

examples/tcp-echo.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
//! Run the server and connect to it with `nc 127.0.0.1 8080`.
44
//! The server will wait for you to enter lines of text and then echo them back.
55
6-
#![feature(async_await)]
7-
86
use futures::prelude::*;
97
use runtime::net::TcpListener;
108

examples/tcp-proxy.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! A TCP proxy server. Forwards connections from port 8081 to port 8080.
22
3-
#![feature(async_await)]
4-
53
use futures::prelude::*;
64
use futures::try_join;
75
use runtime::net::{TcpListener, TcpStream};

examples/udp-client.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
//! UDP client.
42
//!
53
//! To start an echo server do:

examples/udp-echo.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
//! UDP echo server.
42
//!
53
//! To send messages do:

runtime-attributes/src/lib.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
#![forbid(unsafe_code, future_incompatible, rust_2018_idioms)]
55
#![deny(missing_debug_implementations, nonstandard_style)]
6-
#![feature(async_await)]
76
#![recursion_limit = "512"]
87

98
extern crate proc_macro;
@@ -17,8 +16,6 @@ use syn::spanned::Spanned;
1716
/// # Examples
1817
///
1918
/// ```ignore
20-
/// #![feature(async_await)]
21-
///
2219
/// #[runtime::main]
2320
/// async fn main() -> std::io::Result<()> {
2421
/// Ok(())
@@ -82,8 +79,6 @@ pub fn main(attr: TokenStream, item: TokenStream) -> TokenStream {
8279
/// # Examples
8380
///
8481
/// ```ignore
85-
/// #![feature(async_await)]
86-
///
8782
/// #[runtime::test]
8883
/// async fn main() -> std::io::Result<()> {
8984
/// Ok(())
@@ -133,7 +128,7 @@ pub fn test(attr: TokenStream, item: TokenStream) -> TokenStream {
133128
/// # Examples
134129
///
135130
/// ```ignore
136-
/// #![feature(async_await, test)]
131+
/// #![feature(test)]
137132
///
138133
/// extern crate test;
139134
///

runtime-native/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! A cross-platform asynchronous [Runtime](https://github.com/rustasync/runtime). See the [Runtime
22
//! documentation](https://docs.rs/runtime) for more details.
33
4-
#![feature(async_await)]
54
#![deny(unsafe_code)]
65
#![warn(
76
missing_debug_implementations,

runtime-raw/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! perform IO, then there's no need to bother with any of these types as they will have been
66
//! implemented for you already.
77
8-
#![feature(async_await)]
98
#![deny(unsafe_code)]
109
#![warn(
1110
missing_debug_implementations,

runtime-tokio/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! [Runtime](https://github.com/rustasync/runtime). See the [Runtime
33
//! documentation](https://docs.rs/runtime) for more details.
44
5-
#![feature(async_await)]
65
#![warn(
76
missing_debug_implementations,
87
missing_docs,

src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
//! ## Examples
1717
//! __UDP Echo Server__
1818
//! ```no_run
19-
//! #![feature(async_await)]
20-
//!
2119
//! use runtime::net::UdpSocket;
2220
//!
2321
//! #[runtime::main]
@@ -85,7 +83,6 @@
8583
//! - [Runtime Tokio](https://docs.rs/runtime-tokio) provides a thread pool, bindings to the OS, and
8684
//! a work-stealing scheduler.
8785
88-
#![feature(async_await)]
8986
#![warn(
9087
missing_debug_implementations,
9188
missing_docs,

src/net/tcp.rs

-15
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ use futures::task::{Context, Poll};
4646
///
4747
/// ## Examples
4848
/// ```no_run
49-
/// #![feature(async_await)]
50-
///
5149
/// use futures::prelude::*;
5250
/// use runtime::net::TcpStream;
5351
///
@@ -85,7 +83,6 @@ impl TcpStream {
8583
/// # Examples
8684
///
8785
/// ```no_run
88-
/// #![feature(async_await)]
8986
/// use runtime::net::TcpStream;
9087
///
9188
/// # async fn connect_localhost() -> std::io::Result<()> {
@@ -105,7 +102,6 @@ impl TcpStream {
105102
///
106103
/// ## Examples
107104
/// ```no_run
108-
/// #![feature(async_await)]
109105
/// use runtime::net::TcpStream;
110106
/// use std::net::{IpAddr, Ipv4Addr};
111107
///
@@ -125,7 +121,6 @@ impl TcpStream {
125121
///
126122
/// ## Examples
127123
/// ```no_run
128-
/// #![feature(async_await)]
129124
/// use runtime::net::TcpStream;
130125
/// use std::net::{IpAddr, Ipv4Addr};
131126
///
@@ -151,8 +146,6 @@ impl TcpStream {
151146
/// # Examples
152147
///
153148
/// ```no_run
154-
/// #![feature(async_await)]
155-
///
156149
/// use std::net::Shutdown;
157150
/// use runtime::net::TcpStream;
158151
///
@@ -291,8 +284,6 @@ impl fmt::Debug for ConnectFuture {
291284
///
292285
/// # Examples
293286
/// ```ignore
294-
/// #![feature(async_await)]
295-
///
296287
/// use futures::prelude::*;
297288
/// use runtime::net::TcpListener;
298289
///
@@ -367,8 +358,6 @@ impl TcpListener {
367358
/// # Examples
368359
///
369360
/// ```no_run
370-
/// #![feature(async_await)]
371-
///
372361
/// use runtime::net::TcpListener;
373362
/// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
374363
///
@@ -397,8 +386,6 @@ impl TcpListener {
397386
/// ## Examples
398387
///
399388
/// ```no_run
400-
/// #![feature(async_await)]
401-
///
402389
/// use futures::prelude::*;
403390
/// use runtime::net::TcpListener;
404391
///
@@ -430,8 +417,6 @@ impl TcpListener {
430417
/// ## Examples
431418
///
432419
/// ```no_run
433-
/// #![feature(async_await)]
434-
///
435420
/// use futures::prelude::*;
436421
/// use runtime::net::TcpListener;
437422
///

src/net/udp.rs

-8
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ use std::task::{Context, Poll};
3636
///
3737
/// ## Examples
3838
/// ```no_run
39-
/// #![feature(async_await)]
40-
///
4139
/// use runtime::net::UdpSocket;
4240
///
4341
/// #[runtime::main]
@@ -120,7 +118,6 @@ impl UdpSocket {
120118
/// # Examples
121119
///
122120
/// ```no_run
123-
/// #![feature(async_await)]
124121
/// # use std::error::Error;
125122
/// use runtime::net::UdpSocket;
126123
///
@@ -163,7 +160,6 @@ impl UdpSocket {
163160
/// # Examples
164161
///
165162
/// ```no_run
166-
/// #![feature(async_await)]
167163
/// # use std::error::Error;
168164
/// use runtime::net::UdpSocket;
169165
///
@@ -289,8 +285,6 @@ impl UdpSocket {
289285
/// # Examples
290286
///
291287
/// ```rust,no_run
292-
/// #![feature(async_await)]
293-
///
294288
/// use runtime::net::UdpSocket;
295289
/// use std::net::Ipv4Addr;
296290
///
@@ -316,8 +310,6 @@ impl UdpSocket {
316310
/// # Examples
317311
///
318312
/// ```rust,no_run
319-
/// #![feature(async_await)]
320-
///
321313
/// use runtime::net::UdpSocket;
322314
/// use std::net::{Ipv6Addr, SocketAddr};
323315
///

src/task.rs

-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ impl<'a> Spawn for &'a Spawner {
5252
/// # Examples
5353
///
5454
/// ```
55-
/// #![feature(async_await)]
56-
///
5755
/// #[runtime::main]
5856
/// async fn main() {
5957
/// let handle = runtime::spawn(async {

src/time.rs

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//! ## Examples
1616
//! __Delay execution for three seconds__
1717
//! ```no_run
18-
//! # #![feature(async_await)]
1918
//! # #[runtime::main]
2019
//! # async fn main() {
2120
//! use runtime::time::Delay;
@@ -31,7 +30,6 @@
3130
//!
3231
//! __Emit an event every two seconds__
3332
//! ```no_run
34-
//! # #![feature(async_await)]
3533
//! # #[runtime::main]
3634
//! # async fn main() {
3735
//! # use futures::prelude::*;

src/time/delay.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ impl Delay {
1616
///
1717
/// ## Examples
1818
/// ```
19-
/// # #![feature(async_await)]
2019
/// use runtime::time::Delay;
2120
/// use std::time::{Duration, Instant};
2221
///
@@ -38,7 +37,6 @@ impl Delay {
3837
///
3938
/// ## Examples
4039
/// ```
41-
/// # #![feature(async_await)]
4240
/// use runtime::time::Delay;
4341
/// use std::time::{Duration, Instant};
4442
///

src/time/ext.rs

-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ pub trait FutureExt: Future + Sized {
5858
///
5959
/// # Examples
6060
/// ```
61-
/// # #![feature(async_await)]
6261
/// use futures::prelude::*;
6362
/// use runtime::prelude::*;
6463
/// use std::time::{Duration, Instant};
@@ -107,7 +106,6 @@ pub trait FutureExt: Future + Sized {
107106
///
108107
/// # Examples
109108
/// ```
110-
/// # #![feature(async_await)]
111109
/// use futures::prelude::*;
112110
/// use runtime::prelude::*;
113111
/// use std::time::{Duration, Instant};
@@ -194,7 +192,6 @@ pub trait StreamExt: Stream + Sized {
194192
///
195193
/// ## Examples
196194
/// ```
197-
/// # #![feature(async_await)]
198195
/// # use futures::prelude::*;
199196
/// use runtime::time::{Interval, StreamExt as _};
200197
/// use std::time::{Duration, Instant};
@@ -279,7 +276,6 @@ pub trait AsyncReadExt: AsyncRead + Sized {
279276
/// ## Examples
280277
///
281278
/// ```no_run
282-
/// # #![feature(async_await)]
283279
/// # #[runtime::main]
284280
/// # async fn main () -> Result<(), Box<dyn std::error::Error + 'static + Send + Sync>> {
285281
/// use futures::prelude::*;

src/time/interval.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ impl Interval {
1616
///
1717
/// ## Examples
1818
/// ```
19-
/// # #![feature(async_await)]
2019
/// # use futures::prelude::*;
2120
/// use runtime::time::Interval;
2221
/// use std::time::{Duration, Instant};

tests/native.rs

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

53
#[runtime::test(Native)]

tests/tokio-current-thread.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(async_await)]
2-
31
#[runtime::test(runtime_tokio::TokioCurrentThread)]
42
async fn spawn() {
53
let handle = runtime::spawn(async {

tests/tokio.rs

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

53
#[runtime::test(Tokio)]

0 commit comments

Comments
 (0)