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

Remove async_await feature #99

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ asynchronous software.
## Examples
__UDP Echo Server__
```rust
#![feature(async_await)]

use runtime::net::UdpSocket;

#[runtime::main]
Expand Down
2 changes: 1 addition & 1 deletion benches/baseline.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(test, async_await)]
#![feature(test)]

extern crate test;

Expand Down
2 changes: 1 addition & 1 deletion benches/native.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(test, async_await)]
#![feature(test)]
#![warn(rust_2018_idioms)]

extern crate test;
Expand Down
2 changes: 1 addition & 1 deletion benches/tokio.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(test, async_await)]
#![feature(test)]
#![warn(rust_2018_idioms)]

extern crate test;
Expand Down
2 changes: 0 additions & 2 deletions examples/guessing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
//! $ nc localhost 8080
//! ```

#![feature(async_await)]

use futures::prelude::*;
use rand::Rng;
use runtime::net::{TcpListener, TcpStream};
Expand Down
2 changes: 0 additions & 2 deletions examples/hello.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

async fn say_hi() {
println!("Hello world! 🤖");
}
Expand Down
2 changes: 0 additions & 2 deletions examples/tcp-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//! $ cargo run --example tcp-echo
//! ```

#![feature(async_await)]

use futures::prelude::*;
use runtime::net::TcpStream;

Expand Down
2 changes: 0 additions & 2 deletions examples/tcp-echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! Run the server and connect to it with `nc 127.0.0.1 8080`.
//! The server will wait for you to enter lines of text and then echo them back.

#![feature(async_await)]

use futures::prelude::*;
use runtime::net::TcpListener;

Expand Down
2 changes: 0 additions & 2 deletions examples/tcp-proxy.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! A TCP proxy server. Forwards connections from port 8081 to port 8080.

#![feature(async_await)]

use futures::prelude::*;
use futures::try_join;
use runtime::net::{TcpListener, TcpStream};
Expand Down
2 changes: 0 additions & 2 deletions examples/udp-client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

//! UDP client.
//!
//! To start an echo server do:
Expand Down
2 changes: 0 additions & 2 deletions examples/udp-echo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

//! UDP echo server.
//!
//! To send messages do:
Expand Down
7 changes: 1 addition & 6 deletions runtime-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#![forbid(unsafe_code, future_incompatible, rust_2018_idioms)]
#![deny(missing_debug_implementations, nonstandard_style)]
#![feature(async_await)]
#![recursion_limit = "512"]

extern crate proc_macro;
Expand All @@ -17,8 +16,6 @@ use syn::spanned::Spanned;
/// # Examples
///
/// ```ignore
/// #![feature(async_await)]
///
/// #[runtime::main]
/// async fn main() -> std::io::Result<()> {
/// Ok(())
Expand Down Expand Up @@ -82,8 +79,6 @@ pub fn main(attr: TokenStream, item: TokenStream) -> TokenStream {
/// # Examples
///
/// ```ignore
/// #![feature(async_await)]
///
/// #[runtime::test]
/// async fn main() -> std::io::Result<()> {
/// Ok(())
Expand Down Expand Up @@ -133,7 +128,7 @@ pub fn test(attr: TokenStream, item: TokenStream) -> TokenStream {
/// # Examples
///
/// ```ignore
/// #![feature(async_await, test)]
/// #![feature(test)]
///
/// extern crate test;
///
Expand Down
1 change: 0 additions & 1 deletion runtime-native/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! A cross-platform asynchronous [Runtime](https://github.com/rustasync/runtime). See the [Runtime
//! documentation](https://docs.rs/runtime) for more details.

#![feature(async_await)]
#![deny(unsafe_code)]
#![warn(
missing_debug_implementations,
Expand Down
1 change: 0 additions & 1 deletion runtime-raw/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//! perform IO, then there's no need to bother with any of these types as they will have been
//! implemented for you already.

#![feature(async_await)]
#![deny(unsafe_code)]
#![warn(
missing_debug_implementations,
Expand Down
1 change: 0 additions & 1 deletion runtime-tokio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//! [Runtime](https://github.com/rustasync/runtime). See the [Runtime
//! documentation](https://docs.rs/runtime) for more details.

#![feature(async_await)]
#![warn(
missing_debug_implementations,
missing_docs,
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
//! ## Examples
//! __UDP Echo Server__
//! ```no_run
//! #![feature(async_await)]
//!
//! use runtime::net::UdpSocket;
//!
//! #[runtime::main]
Expand Down Expand Up @@ -85,7 +83,6 @@
//! - [Runtime Tokio](https://docs.rs/runtime-tokio) provides a thread pool, bindings to the OS, and
//! a work-stealing scheduler.

#![feature(async_await)]
#![warn(
missing_debug_implementations,
missing_docs,
Expand Down
15 changes: 0 additions & 15 deletions src/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ use futures::task::{Context, Poll};
///
/// ## Examples
/// ```no_run
/// #![feature(async_await)]
///
/// use futures::prelude::*;
/// use runtime::net::TcpStream;
///
Expand Down Expand Up @@ -85,7 +83,6 @@ impl TcpStream {
/// # Examples
///
/// ```no_run
/// #![feature(async_await)]
/// use runtime::net::TcpStream;
///
/// # async fn connect_localhost() -> std::io::Result<()> {
Expand All @@ -105,7 +102,6 @@ impl TcpStream {
///
/// ## Examples
/// ```no_run
/// #![feature(async_await)]
/// use runtime::net::TcpStream;
/// use std::net::{IpAddr, Ipv4Addr};
///
Expand All @@ -125,7 +121,6 @@ impl TcpStream {
///
/// ## Examples
/// ```no_run
/// #![feature(async_await)]
/// use runtime::net::TcpStream;
/// use std::net::{IpAddr, Ipv4Addr};
///
Expand All @@ -151,8 +146,6 @@ impl TcpStream {
/// # Examples
///
/// ```no_run
/// #![feature(async_await)]
///
/// use std::net::Shutdown;
/// use runtime::net::TcpStream;
///
Expand Down Expand Up @@ -291,8 +284,6 @@ impl fmt::Debug for ConnectFuture {
///
/// # Examples
/// ```ignore
/// #![feature(async_await)]
///
/// use futures::prelude::*;
/// use runtime::net::TcpListener;
///
Expand Down Expand Up @@ -367,8 +358,6 @@ impl TcpListener {
/// # Examples
///
/// ```no_run
/// #![feature(async_await)]
///
/// use runtime::net::TcpListener;
/// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
///
Expand Down Expand Up @@ -397,8 +386,6 @@ impl TcpListener {
/// ## Examples
///
/// ```no_run
/// #![feature(async_await)]
///
/// use futures::prelude::*;
/// use runtime::net::TcpListener;
///
Expand Down Expand Up @@ -430,8 +417,6 @@ impl TcpListener {
/// ## Examples
///
/// ```no_run
/// #![feature(async_await)]
///
/// use futures::prelude::*;
/// use runtime::net::TcpListener;
///
Expand Down
8 changes: 0 additions & 8 deletions src/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ use std::task::{Context, Poll};
///
/// ## Examples
/// ```no_run
/// #![feature(async_await)]
///
/// use runtime::net::UdpSocket;
///
/// #[runtime::main]
Expand Down Expand Up @@ -120,7 +118,6 @@ impl UdpSocket {
/// # Examples
///
/// ```no_run
/// #![feature(async_await)]
/// # use std::error::Error;
/// use runtime::net::UdpSocket;
///
Expand Down Expand Up @@ -163,7 +160,6 @@ impl UdpSocket {
/// # Examples
///
/// ```no_run
/// #![feature(async_await)]
/// # use std::error::Error;
/// use runtime::net::UdpSocket;
///
Expand Down Expand Up @@ -289,8 +285,6 @@ impl UdpSocket {
/// # Examples
///
/// ```rust,no_run
/// #![feature(async_await)]
///
/// use runtime::net::UdpSocket;
/// use std::net::Ipv4Addr;
///
Expand All @@ -316,8 +310,6 @@ impl UdpSocket {
/// # Examples
///
/// ```rust,no_run
/// #![feature(async_await)]
///
/// use runtime::net::UdpSocket;
/// use std::net::{Ipv6Addr, SocketAddr};
///
Expand Down
2 changes: 0 additions & 2 deletions src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ impl<'a> Spawn for &'a Spawner {
/// # Examples
///
/// ```
/// #![feature(async_await)]
///
/// #[runtime::main]
/// async fn main() {
/// let handle = runtime::spawn(async {
Expand Down
2 changes: 0 additions & 2 deletions src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//! ## Examples
//! __Delay execution for three seconds__
//! ```no_run
//! # #![feature(async_await)]
//! # #[runtime::main]
//! # async fn main() {
//! use runtime::time::Delay;
Expand All @@ -31,7 +30,6 @@
//!
//! __Emit an event every two seconds__
//! ```no_run
//! # #![feature(async_await)]
//! # #[runtime::main]
//! # async fn main() {
//! # use futures::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions src/time/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ impl Delay {
///
/// ## Examples
/// ```
/// # #![feature(async_await)]
/// use runtime::time::Delay;
/// use std::time::{Duration, Instant};
///
Expand All @@ -38,7 +37,6 @@ impl Delay {
///
/// ## Examples
/// ```
/// # #![feature(async_await)]
/// use runtime::time::Delay;
/// use std::time::{Duration, Instant};
///
Expand Down
4 changes: 0 additions & 4 deletions src/time/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ pub trait FutureExt: Future + Sized {
///
/// # Examples
/// ```
/// # #![feature(async_await)]
/// use futures::prelude::*;
/// use runtime::prelude::*;
/// use std::time::{Duration, Instant};
Expand Down Expand Up @@ -107,7 +106,6 @@ pub trait FutureExt: Future + Sized {
///
/// # Examples
/// ```
/// # #![feature(async_await)]
/// use futures::prelude::*;
/// use runtime::prelude::*;
/// use std::time::{Duration, Instant};
Expand Down Expand Up @@ -194,7 +192,6 @@ pub trait StreamExt: Stream + Sized {
///
/// ## Examples
/// ```
/// # #![feature(async_await)]
/// # use futures::prelude::*;
/// use runtime::time::{Interval, StreamExt as _};
/// use std::time::{Duration, Instant};
Expand Down Expand Up @@ -279,7 +276,6 @@ pub trait AsyncReadExt: AsyncRead + Sized {
/// ## Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # #[runtime::main]
/// # async fn main () -> Result<(), Box<dyn std::error::Error + 'static + Send + Sync>> {
/// use futures::prelude::*;
Expand Down
1 change: 0 additions & 1 deletion src/time/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ impl Interval {
///
/// ## Examples
/// ```
/// # #![feature(async_await)]
/// # use futures::prelude::*;
/// use runtime::time::Interval;
/// use std::time::{Duration, Instant};
Expand Down
2 changes: 0 additions & 2 deletions tests/native.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use runtime_native::Native;

#[runtime::test(Native)]
Expand Down
2 changes: 0 additions & 2 deletions tests/tokio-current-thread.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

#[runtime::test(runtime_tokio::TokioCurrentThread)]
async fn spawn() {
let handle = runtime::spawn(async {
Expand Down
2 changes: 0 additions & 2 deletions tests/tokio.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use runtime_tokio::Tokio;

#[runtime::test(Tokio)]
Expand Down