Remove async_await feature

This commit is contained in:
Taiki Endo 2019-08-21 23:22:35 +09:00 committed by Taylor Cramer
parent a9d80c6402
commit 2bdc0a1d77
13 changed files with 4 additions and 25 deletions

View File

@ -2,7 +2,7 @@ sudo: false
dist: trusty
language: rust
cache: cargo
rust: nightly-2019-05-09 # minimum required version for async/await
rust: nightly-2019-08-21 # minimum required version for async/await
before_install:
- cargo install mdbook --vers '0.3.1' --debug --force

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
use {
futures::{

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
use futures::executor::block_on;

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
// ANCHOR: imports
use {

View File

@ -1,5 +1,3 @@
#![feature(async_await)]
// ANCHOR: imports
use {
std::{

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
// ANCHOR: imports
use {

View File

@ -1,6 +1,5 @@
#![allow(unused)]
#![cfg(test)]
#![feature(async_await)]
mod async_fn_and_block_examples {
use std::future::Future;

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
mod stream_trait {
use {

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
use {
futures::{

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
struct Book;
struct Music;

View File

@ -1,5 +1,4 @@
#![cfg(test)]
#![feature(async_await)]
#![recursion_limit="128"]
mod example {

View File

@ -3,8 +3,8 @@
The asynchronous Rust ecosystem has undergone a lot of evolution over time,
so it can be hard to know what tools to use, what libraries to invest in,
or what documentation to read. However, the `Future` trait inside the standard
library has recently been stabilized, and the `async`/`await` feature will
follow shortly. The ecosystem as a whole is therefore in the midst of migrating
library and the `async`/`await` language feature has recently been stabilized.
The ecosystem as a whole is therefore in the midst of migrating
to the newly-stabilized API, after which point churn will be significantly
reduced.

View File

@ -16,17 +16,7 @@ Let's add some dependencies to the `Cargo.toml` file:
```
Now that we've got our dependencies out of the way, let's start writing some
code. Open up `src/main.rs` and enable the `async_await` feature at the top of
the file:
```rust
#![feature(async_await)]
```
This adds support for the nightly-only but soon-to-be-stabilized
`async`/`await` syntax.
Additionally, we have some imports to add:
code. We have some imports to add:
```rust
{{#include ../../examples/01_05_http_server/src/lib.rs:imports}}