Remove stabilized 'async_await' feature gate and update the minimum nightly version.

This commit is contained in:
Jacob Pratt 2019-08-20 19:53:00 -04:00 committed by Sergio Benitez
parent af95129590
commit e44c5896b8
111 changed files with 154 additions and 181 deletions

View File

@ -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;
@ -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;
@ -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;
@ -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;

View File

@ -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;
@ -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;
@ -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;
@ -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;

View File

@ -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")]

View File

@ -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;
@ -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;

View File

@ -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};
@ -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;
/// #
@ -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;
/// #

View File

@ -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() { }
@ -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() { }

View File

@ -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;
@ -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;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use]
#[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))]

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use]
#[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))]

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use]
#[cfg(feature = "helmet")]

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[cfg(feature = "serve")]
mod static_tests {

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[cfg(feature = "templates")]
#[macro_use] extern crate rocket;

View File

@ -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")]
@ -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() { }
@ -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};
@ -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("/")]
@ -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 = "/")]
@ -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;
@ -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;
@ -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("/")]
@ -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;
@ -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)]
@ -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() { /* .. */ }
@ -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>")]
@ -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>")]

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
use rocket::local::Client;
use rocket::response::Responder;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -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

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#![allow(dead_code, unused_variables)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,6 +1,6 @@
// must-compile-successfully
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -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;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -54,7 +54,7 @@ mod key {
/// a handler to retrieve the value of a "message" cookie.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::http::Cookies;
///
@ -74,7 +74,7 @@ mod key {
/// [private cookie]: Cookies::add_private()
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// use rocket::http::Status;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#![recursion_limit="512"]
#![warn(rust_2018_idioms)]

View File

@ -155,7 +155,7 @@ use crate::uri::{self, UriPart, UriDisplay};
/// With these implementations, the following typechecks:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # use std::fmt;
/// use rocket::http::RawStr;

View File

@ -61,7 +61,7 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter};
/// the following route:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #[get("/item/<id>?<track>")]
/// fn get_item(id: i32, track: Option<String>) { /* .. */ }
@ -70,7 +70,7 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter};
/// A URI for this route can be generated as follows:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # type T = ();
/// # #[get("/item/<id>?<track>")]
@ -236,7 +236,7 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter};
/// `UriDisplay` implementation is required.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::http::RawStr;
/// use rocket::request::FromParam;
@ -434,7 +434,7 @@ impl<T: UriDisplay<Query>, E> UriDisplay<Query> for Result<T, E> {
/// trait for the corresponding `UriPart`.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #[get("/item/<id>?<track>")]
/// fn get_item(id: i32, track: Option<u8>) { /* .. */ }

View File

@ -3,8 +3,8 @@
use yansi::{Paint, Color::{Red, Yellow, Blue}};
// Specifies the minimum nightly version needed to compile Rocket.
const MIN_DATE: &'static str = "2019-07-03";
const MIN_VERSION: &'static str = "1.37.0-nightly";
const MIN_DATE: &'static str = "2019-08-20";
const MIN_VERSION: &'static str = "1.39.0-nightly";
macro_rules! err {
($version:expr, $date:expr, $msg:expr) => (

View File

@ -36,7 +36,7 @@ use yansi::Color::*;
/// declared using the `catch` decorator, as follows:
///
/// ```rust
/// #![feature(proc_macro_hygiene, async_await)]
/// #![feature(proc_macro_hygiene)]
///
/// #[macro_use] extern crate rocket;
///

View File

@ -22,7 +22,7 @@ const PEEK_BYTES: usize = 512;
/// specifying the `data = "<var>"` route parameter as follows:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # type DataGuard = rocket::data::Data;
/// #[post("/submit", data = "<var>")]
@ -133,7 +133,6 @@ impl Data {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io;
/// use futures::io::AllowStdIo;
/// use rocket::Data;
@ -161,7 +160,6 @@ impl Data {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io;
/// use rocket::Data;
///

View File

@ -142,7 +142,7 @@ pub type FromDataFuture<'a, T, E> = Pin<Box<dyn Future<Output = Outcome<T, E>> +
/// if the guard returns successfully.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # type DataGuard = rocket::data::Data;
/// #[post("/submit", data = "<var>")]
@ -188,7 +188,7 @@ pub type FromDataFuture<'a, T, E> = Pin<Box<dyn Future<Output = Outcome<T, E>> +
/// `String` (an `&str`).
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[derive(Debug)]
/// # struct Name<'a> { first: &'a str, last: &'a str, }
@ -443,7 +443,7 @@ impl<'a> FromData<'a> for Data {
/// that you can retrieve it directly from a client's request body:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # type Person = rocket::data::Data;
/// #[post("/person", data = "<person>")]
@ -455,7 +455,7 @@ impl<'a> FromData<'a> for Data {
/// A `FromDataSimple` implementation allowing this looks like:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # #[derive(Debug)]

View File

@ -117,7 +117,6 @@ impl AdHoc {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::fairing::AdHoc;
///
/// // The no-op response fairing.

View File

@ -20,7 +20,6 @@
//! write:
//!
//! ```rust
//! # #![feature(async_await)]
//! # use rocket::fairing::AdHoc;
//! # let req_fairing = AdHoc::on_request("Request", |_, _| ());
//! # let res_fairing = AdHoc::on_response("Response", |_, _| Box::pin(async move {}));
@ -207,7 +206,6 @@ pub use self::info_kind::{Info, Kind};
/// path.
///
/// ```rust
/// # #![feature(async_await)]
/// use std::future::Future;
/// use std::io::Cursor;
/// use std::pin::Pin;
@ -271,7 +269,6 @@ pub use self::info_kind::{Info, Kind};
/// request guard.
///
/// ```rust
/// # #![feature(async_await)]
/// # use std::future::Future;
/// # use std::pin::Pin;
/// # use std::time::{Duration, SystemTime};

View File

@ -42,7 +42,6 @@ pub type HandlerFuture<'r> = std::pin::Pin<Box<dyn Future<Output = Outcome<'r>>
/// Such a handler might be written and used as follows:
///
/// ```rust
/// # #![feature(async_await)]
/// # #[derive(Copy, Clone)] enum Kind { Simple, Intermediate, Complex, }
/// use rocket::{Request, Data, Route, http::Method};
/// use rocket::handler::{self, Handler, Outcome, HandlerFuture};
@ -92,7 +91,7 @@ pub type HandlerFuture<'r> = std::pin::Pin<Box<dyn Future<Output = Outcome<'r>>
/// managed state and a static route, as follows:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # #[derive(Copy, Clone)]
@ -199,7 +198,6 @@ impl<'r> Outcome<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::{Request, Data};
/// use rocket::handler::{Outcome, HandlerFuture};
///
@ -255,7 +253,6 @@ impl<'r> Outcome<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::{Request, Data};
/// use rocket::handler::{Outcome, HandlerFuture};
///
@ -284,7 +281,6 @@ impl<'r> Outcome<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::{Request, Data};
/// use rocket::handler::{Outcome, HandlerFuture};
/// use rocket::http::Status;
@ -309,7 +305,6 @@ impl<'r> Outcome<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::{Request, Data};
/// use rocket::handler::{Outcome, HandlerFuture};
///

View File

@ -1,5 +1,4 @@
#![feature(proc_macro_hygiene)]
#![feature(async_await)]
#![recursion_limit="256"]
@ -48,7 +47,7 @@
//! Then, add the following to the top of your `main.rs` file:
//!
//! ```rust
//! #![feature(proc_macro_hygiene, async_await)]
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket;
//! # #[get("/")] fn hello() { }
@ -59,7 +58,7 @@
//! write Rocket applications. Here's a simple example to get you started:
//!
//! ```rust
//! #![feature(proc_macro_hygiene, async_await)]
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket;
//!

View File

@ -67,7 +67,7 @@
//! consider the following complete "Hello, world!" application, with testing.
//!
//! ```rust
//! #![feature(proc_macro_hygiene, async_await)]
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket;
//!

View File

@ -50,7 +50,7 @@ pub enum FormDataError<'f, E> {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::request::{Form, FormError, FormDataError};
///

View File

@ -33,7 +33,7 @@ use crate::ext::AsyncReadExt as _;
/// implements the `FromForm` trait:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::request::Form;
/// use rocket::http::RawStr;
@ -69,7 +69,7 @@ use crate::ext::AsyncReadExt as _;
/// A handler that handles a form of this type can similarly by written:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #![allow(deprecated, unused_attributes)]
/// # #[macro_use] extern crate rocket;
/// # use rocket::request::Form;
@ -122,7 +122,7 @@ impl<T> Form<T> {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::request::Form;
///

View File

@ -13,7 +13,7 @@ use crate::request::FormItems;
/// validation.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #![allow(deprecated, dead_code, unused_attributes)]
/// # #[macro_use] extern crate rocket;
/// #[derive(FromForm)]
@ -30,7 +30,7 @@ use crate::request::FormItems;
/// data via the `data` parameter and `Form` type.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #![allow(deprecated, dead_code, unused_attributes)]
/// # #[macro_use] extern crate rocket;
/// # use rocket::request::Form;

View File

@ -43,7 +43,7 @@ use crate::http::RawStr;
/// according to its target type:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # type Size = String;
/// #[get("/item?<id>&<size>")]

View File

@ -31,7 +31,7 @@ use crate::http::uri::{Query, FromUriParam};
/// handler:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::request::LenientForm;
///
@ -67,7 +67,7 @@ impl<T> LenientForm<T> {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::request::LenientForm;
///

View File

@ -55,7 +55,7 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// guard.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # use rocket::http::Method;
/// # type A = Method; type B = Method; type C = Method; type T = ();
@ -165,7 +165,7 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// `sensitive` handler.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// use rocket::Outcome;
@ -220,7 +220,7 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// routes (`admin_dashboard` and `user_dashboard`):
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[cfg(feature = "private-cookies")] mod inner {
/// # use rocket::outcome::{IntoOutcome, Outcome};
@ -283,7 +283,7 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// used, as illustrated below:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # #[cfg(feature = "private-cookies")] mod inner {
/// # use rocket::outcome::{IntoOutcome, Outcome};

View File

@ -19,7 +19,7 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}};
/// handler for the dynamic `"/<id>"` path:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #[get("/<id>")]
/// fn hello(id: usize) -> String {
@ -54,7 +54,7 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}};
/// parameter as follows:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # use rocket::http::RawStr;
/// #[get("/<id>")]
@ -172,7 +172,7 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}};
/// dynamic path segment:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # use rocket::request::FromParam;
/// # use rocket::http::RawStr;

View File

@ -8,7 +8,7 @@ use crate::request::{FormItems, FormItem, Form, LenientForm, FromForm};
/// generation for every trailing query parameter, `<params..>` below:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # use rocket::request::Form;
@ -82,7 +82,7 @@ impl<'q> Iterator for Query<'q> {
/// route:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::request::Form;
///

View File

@ -22,7 +22,7 @@ use crate::http::Status;
/// following example does just this:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::State;
///
@ -87,7 +87,7 @@ use crate::http::Status;
/// [`State::from()`] static method:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::State;
///

View File

@ -48,7 +48,7 @@ const FLASH_COOKIE_DELIM: char = ':';
/// message on both the request and response sides.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::response::{Flash, Redirect};
/// use rocket::request::FlashMessage;

View File

@ -26,7 +26,7 @@ use crate::http::Status;
/// a route, _always_ use [`uri!`] to construct a valid [`Origin`]:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::response::Redirect;
///

View File

@ -14,7 +14,7 @@ use crate::request::Request;
/// as illustrated below with `T`:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// # type T = ();
/// #
@ -155,7 +155,7 @@ use crate::request::Request;
/// following `Responder` implementation accomplishes this:
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// # #[derive(Debug)]

View File

@ -345,7 +345,6 @@ impl<'r> ResponseBuilder<'r> {
/// # Example
///
/// ```rust,ignore
/// # #![feature(async_await)]
/// use rocket::Response;
/// use futures::compat::{AsyncRead01CompatExt, Future01CompatExt};
/// use tokio::fs::File;
@ -373,7 +372,6 @@ impl<'r> ResponseBuilder<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::Response;
/// use futures::compat::{AsyncRead01CompatExt, Future01CompatExt};
/// use tokio::fs::File;
@ -402,7 +400,6 @@ impl<'r> ResponseBuilder<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use rocket::Response;
/// use futures::compat::{AsyncRead01CompatExt, Future01CompatExt};
/// use tokio::fs::File;
@ -896,7 +893,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::Cursor;
/// use rocket::Response;
///
@ -928,7 +924,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::Cursor;
/// use rocket::Response;
///
@ -959,7 +954,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::Cursor;
/// use rocket::Response;
///
@ -989,7 +983,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::Cursor;
/// use rocket::Response;
///
@ -1039,7 +1032,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::Cursor;
/// use rocket::Response;
///
@ -1068,7 +1060,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::repeat;
/// use futures::io::AsyncReadExt;
/// use rocket::Response;
@ -1091,7 +1082,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::repeat;
/// use futures::io::AsyncReadExt;
/// use rocket::Response;
@ -1116,7 +1106,6 @@ impl<'r> Response<'r> {
/// # Example
///
/// ```rust
/// # #![feature(async_await)]
/// use std::io::Cursor;
/// use rocket::response::{Response, Body};
///

View File

@ -497,7 +497,7 @@ impl Rocket {
/// dispatched to the `hi` route.
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// #
/// #[get("/world")]
@ -569,7 +569,7 @@ impl Rocket {
/// # Examples
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::Request;
///
@ -625,7 +625,7 @@ impl Rocket {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::State;
///
@ -662,7 +662,7 @@ impl Rocket {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::Rocket;
/// use rocket::fairing::AdHoc;
@ -806,7 +806,7 @@ impl Rocket {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::Rocket;
/// use rocket::fairing::AdHoc;
@ -862,7 +862,7 @@ impl Rocket {
/// # Example
///
/// ```rust
/// # #![feature(proc_macro_hygiene, async_await)]
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket;
/// use rocket::Rocket;
/// use rocket::fairing::AdHoc;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
use rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use]
#[cfg(feature = "private-cookies")]

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#![allow(dead_code)] // This test is only here so that we can ensure it compiles.
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
#[macro_use] extern crate serde_derive;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
#[macro_use] extern crate serde_derive;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[cfg(test)] mod tests;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
#[macro_use] extern crate rocket_contrib;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
#[macro_use] extern crate serde_derive;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

View File

@ -1,4 +1,4 @@
#![feature(proc_macro_hygiene, async_await)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;

Some files were not shown because too many files have changed in this diff Show More