Skip to content

Commit

Permalink
Remove stabilized 'async_await' feature gate and update the minimum n…
Browse files Browse the repository at this point in the history
…ightly version.
  • Loading branch information
jhpratt authored and SergioBenitez committed Jul 11, 2020
1 parent af95129 commit e44c589
Show file tree
Hide file tree
Showing 111 changed files with 154 additions and 181 deletions.
8 changes: 4 additions & 4 deletions contrib/lib/src/databases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
//! In your application's source code, one-time:
//!
//! ```rust
//! #![feature(proc_macro_hygiene, async_await)]
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket;
//! #[macro_use] extern crate rocket_contrib;
Expand All @@ -73,7 +73,7 @@
//! Whenever a connection to the database is needed:
//!
//! ```rust
//! # #![feature(proc_macro_hygiene, async_await)]
//! # #![feature(proc_macro_hygiene)]
//! #
//! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib;
Expand Down Expand Up @@ -289,7 +289,7 @@
//! connection to a given database:
//!
//! ```rust
//! # #![feature(proc_macro_hygiene, async_await)]
//! # #![feature(proc_macro_hygiene)]
//! #
//! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib;
Expand All @@ -311,7 +311,7 @@
//! connection type:
//!
//! ```rust
//! # #![feature(proc_macro_hygiene, async_await)]
//! # #![feature(proc_macro_hygiene)]
//! #
//! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib;
Expand Down
8 changes: 4 additions & 4 deletions contrib/lib/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub use serde_json::{json_internal, json_internal_vec};
/// or from [`serde`]. The data is parsed from the HTTP request body.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib;
/// # type User = usize;
Expand All @@ -68,7 +68,7 @@ pub use serde_json::{json_internal, json_internal_vec};
/// set to `application/json` automatically.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib;
/// # type User = usize;
Expand Down Expand Up @@ -219,7 +219,7 @@ impl<T> DerefMut for Json<T> {
/// fashion during request handling. This looks something like:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::json::JsonValue;
Expand Down Expand Up @@ -314,7 +314,7 @@ impl<'r> Responder<'r> for JsonValue {
/// value created with this macro can be returned from a handler as follows:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::json::JsonValue;
Expand Down
1 change: 0 additions & 1 deletion contrib/lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
#![doc(html_root_url = "https://api.rocket.rs/v0.5")]
#![doc(html_favicon_url = "https://rocket.rs/images/favicon.ico")]
#![doc(html_logo_url = "https://rocket.rs/images/logo-boxed.png")]
Expand Down
4 changes: 2 additions & 2 deletions contrib/lib/src/msgpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub use rmp_serde::decode::Error;
/// request body.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib;
/// # type User = usize;
Expand All @@ -66,7 +66,7 @@ pub use rmp_serde::decode::Error;
/// response is set to `application/msgpack` automatically.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib;
/// # type User = usize;
Expand Down
6 changes: 3 additions & 3 deletions contrib/lib/src/templates/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::templates::ContextManager;
/// used as a request guard in any request handler.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::templates::{Template, Metadata};
Expand Down Expand Up @@ -46,7 +46,7 @@ impl Metadata<'_> {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib;
/// #
Expand All @@ -67,7 +67,7 @@ impl Metadata<'_> {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib;
/// #
Expand Down
4 changes: 2 additions & 2 deletions contrib/lib/src/templates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
//! of the template file minus the last two extensions, from a handler.
//!
//! ```rust
//! # #![feature(proc_macro_hygiene, async_await)]
//! # #![feature(proc_macro_hygiene)]
//! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib;
//! # fn context() { }
Expand Down Expand Up @@ -180,7 +180,7 @@ const DEFAULT_TEMPLATE_DIR: &str = "templates";
/// returned from a request handler directly:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib;
/// # fn context() { }
Expand Down
4 changes: 2 additions & 2 deletions contrib/lib/src/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type ParseError = <self::uuid_crate::Uuid as FromStr>::Err;
/// You can use the `Uuid` type directly as a target of a dynamic parameter:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::uuid::Uuid;
Expand All @@ -56,7 +56,7 @@ type ParseError = <self::uuid_crate::Uuid as FromStr>::Err;
/// You can also use the `Uuid` as a form value, including in query strings:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::uuid::Uuid;
Expand Down
2 changes: 1 addition & 1 deletion contrib/lib/tests/compress_responder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use]
#[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))]
Expand Down
2 changes: 1 addition & 1 deletion contrib/lib/tests/compression_fairing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use]
#[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))]
Expand Down
2 changes: 1 addition & 1 deletion contrib/lib/tests/helmet.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use]
#[cfg(feature = "helmet")]
Expand Down
2 changes: 1 addition & 1 deletion contrib/lib/tests/static_files.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[cfg(feature = "serve")]
mod static_tests {
Expand Down
2 changes: 1 addition & 1 deletion contrib/lib/tests/templates.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[cfg(feature = "templates")]
#[macro_use] extern crate rocket;
Expand Down
25 changes: 12 additions & 13 deletions core/codegen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(proc_macro_diagnostic, proc_macro_span)]
#![feature(async_await)]
#![recursion_limit="128"]

#![doc(html_root_url = "https://api.rocket.rs/v0.5")]
Expand Down Expand Up @@ -30,7 +29,7 @@
//! crate root:
//!
//! ```rust
//! #![feature(proc_macro_hygiene, async_await)]
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket;
//! # #[get("/")] fn hello() { }
Expand All @@ -40,7 +39,7 @@
//! Or, alternatively, selectively import from the top-level scope:
//!
//! ```rust
//! #![feature(proc_macro_hygiene, async_await)]
//! #![feature(proc_macro_hygiene)]
//! # extern crate rocket;
//!
//! use rocket::{get, routes};
Expand Down Expand Up @@ -147,7 +146,7 @@ macro_rules! route_attribute {
/// functions:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// #[get("/")]
Expand All @@ -170,7 +169,7 @@ macro_rules! route_attribute {
/// specified:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// #[route(GET, path = "/")]
Expand Down Expand Up @@ -231,7 +230,7 @@ macro_rules! route_attribute {
/// the arguments `foo`, `baz`, `msg`, `rest`, and `form`:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # use rocket::request::Form;
/// # use std::path::PathBuf;
Expand Down Expand Up @@ -343,7 +342,7 @@ route_attribute!(options => Method::Options);
/// This attribute can only be applied to free functions:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// use rocket::Request;
Expand Down Expand Up @@ -755,7 +754,7 @@ pub fn derive_uri_display_path(input: TokenStream) -> TokenStream {
/// corresponding [`Route`] structures. For example, given the following routes:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// #[get("/")]
Expand All @@ -770,7 +769,7 @@ pub fn derive_uri_display_path(input: TokenStream) -> TokenStream {
/// The `routes!` macro can be used as:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # use rocket::http::Method;
Expand Down Expand Up @@ -814,7 +813,7 @@ pub fn routes(input: TokenStream) -> TokenStream {
/// catchers:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// #[catch(404)]
Expand All @@ -829,7 +828,7 @@ pub fn routes(input: TokenStream) -> TokenStream {
/// The `catchers!` macro can be used as:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # #[catch(404)] fn not_found() { /* .. */ }
Expand Down Expand Up @@ -871,7 +870,7 @@ pub fn catchers(input: TokenStream) -> TokenStream {
/// For example, for the following route:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// #[get("/person/<name>?<age>")]
Expand All @@ -885,7 +884,7 @@ pub fn catchers(input: TokenStream) -> TokenStream {
/// A URI can be created as follows:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # #[get("/person/<name>?<age>")]
Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/expansion.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/responder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

use rocket::local::Client;
use rocket::response::Responder;
Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/route-data.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/route-format.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/route-ranking.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/route.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

// Rocket sometimes generates mangled identifiers that activate the
// non_snake_case lint. We deny the lint in this test to ensure that
Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/typed-uris.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#![allow(dead_code, unused_variables)]

#[macro_use] extern crate rocket;
Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/catchers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/route-path-bad-syntax.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/route-type-errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/route-warnings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// must-compile-successfully

#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/routes.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/typed-uri-bad-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// normalize-stderr-test: "and \d+ others" -> "and $$N others"
// normalize-stderr-test: "::: (.*)/core/http" -> "::: $$ROCKET/core/http"

#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/typed-uris-bad-params.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]

#[macro_use] extern crate rocket;

Expand Down
Loading

0 comments on commit e44c589

Please sign in to comment.