Skip to content

remove async_await feature gate #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ $ cargo add async-std
## Hello world

```rust
#![feature(async_await)]

use async_std::task;

fn main() {
Expand All @@ -52,8 +50,6 @@ fn main() {
## Low-Friction Sockets with Built-In Timeouts

```rust
#![feature(async_await)]

use std::time::Duration;

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

extern crate test;

Expand Down
2 changes: 0 additions & 2 deletions docs/src/tutorial/accept_loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Let's implement the scaffold of the server: a loop that binds a TCP socket to an
First of all, let's add required import boilerplate:

```rust
#![feature(async_await)]

use std::net::ToSocketAddrs; // 1

use async_std::{
Expand Down
2 changes: 0 additions & 2 deletions docs/src/tutorial/all_together.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
At this point, we only need to start the broker to get a fully-functioning (in the happy case!) chat:

```rust
#![feature(async_await)]

use std::{
net::ToSocketAddrs,
sync::Arc,
Expand Down
2 changes: 0 additions & 2 deletions docs/src/tutorial/handling_disconnection.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ This also allows us to establish a useful invariant that the message channel str
The final code looks like this:

```rust
#![feature(async_await)]

use std::{
net::ToSocketAddrs,
sync::Arc,
Expand Down
2 changes: 0 additions & 2 deletions docs/src/tutorial/implementing_a_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Programming this with threads is cumbersome, especially when implementing clean
With async, we can just use the `select!` macro.

```rust
#![feature(async_await)]

use std::net::ToSocketAddrs;

use futures::select;
Expand Down
2 changes: 0 additions & 2 deletions examples/hello-world.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Spawns a task that says hello.

#![feature(async_await)]

use async_std::task;

async fn say_hi() {
Expand Down
2 changes: 0 additions & 2 deletions examples/line-count.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Counts the number of lines in a file given as an argument.

#![feature(async_await)]

use std::env::args;

use async_std::fs::File;
Expand Down
2 changes: 0 additions & 2 deletions examples/list-dir.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Lists files in a directory given as an argument.

#![feature(async_await)]

use std::env::args;

use async_std::fs;
Expand Down
2 changes: 0 additions & 2 deletions examples/logging.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Prints the runtime's execution log on the standard output.

#![feature(async_await)]

use async_std::task;

fn main() {
Expand Down
2 changes: 0 additions & 2 deletions examples/print-file.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Prints a file given as an argument to stdout.

#![feature(async_await)]

use std::env::args;

use async_std::fs::File;
Expand Down
2 changes: 0 additions & 2 deletions examples/stdin-echo.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Echoes lines read on stdin to stdout.

#![feature(async_await)]

use async_std::io;
use async_std::prelude::*;
use async_std::task;
Expand Down
2 changes: 0 additions & 2 deletions examples/stdin-timeout.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Reads a line from stdin, or exits with an error if nothing is read in 5 seconds.

#![feature(async_await)]

use std::time::Duration;

use async_std::io;
Expand Down
2 changes: 0 additions & 2 deletions examples/surf-web.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Sends an HTTP request to the Rust website.

#![feature(async_await)]

use async_std::task;

fn main() -> Result<(), surf::Exception> {
Expand Down
2 changes: 0 additions & 2 deletions examples/task-local.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Creates a task-local value.

#![feature(async_await)]

use std::cell::Cell;

use async_std::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions examples/task-name.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Spawns a named task that prints its name.

#![feature(async_await)]

use async_std::task;

async fn print_name() {
Expand Down
2 changes: 0 additions & 2 deletions examples/tcp-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
//! $ cargo run --example tcp-client
//! ```

#![feature(async_await)]

use async_std::io;
use async_std::net::TcpStream;
use async_std::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions examples/tcp-echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//! $ nc localhost 8080
//! ```

#![feature(async_await)]

use async_std::io;
use async_std::net::{TcpListener, TcpStream};
use async_std::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions examples/udp-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
//! $ cargo run --example udp-client
//! ```

#![feature(async_await)]

use async_std::io;
use async_std::net::UdpSocket;
use async_std::task;
Expand Down
2 changes: 0 additions & 2 deletions examples/udp-echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//! $ nc -u localhost 8080
//! ```

#![feature(async_await)]

use async_std::io;
use async_std::net::UdpSocket;
use async_std::task;
Expand Down
1 change: 0 additions & 1 deletion src/fs/canonicalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use crate::task::blocking;
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
1 change: 0 additions & 1 deletion src/fs/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use crate::task::blocking;
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
1 change: 0 additions & 1 deletion src/fs/create_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::task::blocking;
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
1 change: 0 additions & 1 deletion src/fs/create_dir_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::io;
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
1 change: 0 additions & 1 deletion src/fs/dir_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ impl DirBuilder {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::DirBuilder;
Expand Down
4 changes: 0 additions & 4 deletions src/fs/dir_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ impl DirEntry {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand All @@ -100,7 +99,6 @@ impl DirEntry {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down Expand Up @@ -154,7 +152,6 @@ impl DirEntry {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down Expand Up @@ -206,7 +203,6 @@ impl DirEntry {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
9 changes: 0 additions & 9 deletions src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use crate::task::{blocking, Context, Poll};
/// Create a new file and write some bytes to it:
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand All @@ -48,7 +47,6 @@ use crate::task::{blocking, Context, Poll};
/// Read the contents of a file into a `Vec<u8>`:
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -124,7 +122,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -171,7 +168,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -218,7 +214,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -274,7 +269,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -334,7 +328,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -381,7 +374,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down Expand Up @@ -433,7 +425,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs::File;
Expand Down
1 change: 0 additions & 1 deletion src/fs/hard_link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use crate::task::blocking;
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
1 change: 0 additions & 1 deletion src/fs/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use crate::task::blocking;
/// # Examples
///
/// ```no_run
/// # #![feature(async_await)]
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use async_std::fs;
Expand Down
1 change: 0 additions & 1 deletion src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
//! Create a new file and write some bytes to it:
//!
//! ```no_run
//! # #![feature(async_await)]
//! # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
//! #
//! use async_std::fs::File;
Expand Down
Loading