From 53353df63326e13e877641d15cbe926ff791eb31 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Mon, 9 Mar 2020 01:58:20 -0700 Subject: [PATCH] Fix more broken links. --- contrib/lib/src/uuid.rs | 2 +- core/codegen/src/lib.rs | 36 ++++++++++++------------- core/http/src/uri/from_uri_param.rs | 2 +- core/http/src/uri/uri_display.rs | 10 ++++--- core/lib/src/request/form/form_items.rs | 2 +- core/lib/src/response/mod.rs | 9 ++++--- core/lib/src/response/redirect.rs | 4 +-- site/guide/4-requests.md | 9 +++---- site/guide/5-responses.md | 8 +++--- 9 files changed, 43 insertions(+), 39 deletions(-) diff --git a/contrib/lib/src/uuid.rs b/contrib/lib/src/uuid.rs index c0ed0bf5..d415cc66 100644 --- a/contrib/lib/src/uuid.rs +++ b/contrib/lib/src/uuid.rs @@ -1,6 +1,6 @@ //! UUID parameter and form value parsing support. //! -//! See the [`Uuid`](uuid::Uuid) type for further details. +//! See the [`Uuid`] type for further details. //! //! # Enabling //! diff --git a/core/codegen/src/lib.rs b/core/codegen/src/lib.rs index 996715ed..e2cb6e99 100644 --- a/core/codegen/src/lib.rs +++ b/core/codegen/src/lib.rs @@ -161,16 +161,16 @@ macro_rules! route_attribute { /// /// There are 7 method-specific route attributes: /// - /// * [`#[get]`] - `GET` specific route - /// * [`#[put]`] - `PUT` specific route - /// * [`#[post]`] - `POST` specific route - /// * [`#[delete]`] - `DELETE` specific route - /// * [`#[head]`] - `HEAD` specific route - /// * [`#[options]`] - `OPTIONS` specific route - /// * [`#[patch]`] - `PATCH` specific route + /// * [`get`] - `GET` specific route + /// * [`put`] - `PUT` specific route + /// * [`post`] - `POST` specific route + /// * [`delete`] - `DELETE` specific route + /// * [`head`] - `HEAD` specific route + /// * [`options`] - `OPTIONS` specific route + /// * [`patch`] - `PATCH` specific route /// - /// Additionally, [`#[route]`] allows the method and path to be - /// explicitly specified: + /// Additionally, [`route`] allows the method and path to be explicitly + /// specified: /// /// ```rust /// # #![feature(proc_macro_hygiene)] @@ -182,14 +182,14 @@ macro_rules! route_attribute { /// } /// ``` /// - /// [`#[delete]`]: attr.delete.html - /// [`#[get]`]: attr.get.html - /// [`#[head]`]: attr.head.html - /// [`#[options]`]: attr.options.html - /// [`#[patch]`]: attr.patch.html - /// [`#[post]`]: attr.post.html - /// [`#[put]`]: attr.put.html - /// [`#[route]`]: attr.route.html + /// [`get`]: attr.get.html + /// [`put`]: attr.put.html + /// [`post`]: attr.post.html + /// [`delete`]: attr.delete.html + /// [`head`]: attr.head.html + /// [`options`]: attr.options.html + /// [`patch`]: attr.patch.html + /// [`route`]: attr.route.html /// /// # Grammar /// @@ -267,7 +267,7 @@ macro_rules! route_attribute { /// /// [`FromParam`]: ../rocket/request/trait.FromParam.html /// [`FromSegments`]: ../rocket/request/trait.FromSegments.html - /// [`FromFormValue`]: ../rocket/request/form/trait.FromFormValue.html + /// [`FromFormValue`]: ../rocket/request/trait.FromFormValue.html /// [`FromQuery`]: ../rocket/request/trait.FromQuery.html /// [`FromData`]: ../rocket/data/trait.FromData.html /// [`FromRequest`]: ../rocket/request/trait.FromRequest.html diff --git a/core/http/src/uri/from_uri_param.rs b/core/http/src/uri/from_uri_param.rs index 4aa374f8..6ad63bc6 100644 --- a/core/http/src/uri/from_uri_param.rs +++ b/core/http/src/uri/from_uri_param.rs @@ -187,7 +187,7 @@ use crate::uri::{self, UriPart, UriDisplay}; /// assert_eq!(uri.query(), Some("name=Robert%20Mike&nickname=Bob")); /// ``` /// -/// [`uri!`]: rocket_codegen::uri +/// [`uri!`]: crate::uri /// [`UriDisplay`]: crate::uri::UriDisplay /// [`FromUriParam::Target`]: crate::uri::FromUriParam::Target /// [`Path`]: crate::uri::Path diff --git a/core/http/src/uri/uri_display.rs b/core/http/src/uri/uri_display.rs index 153778fb..d75c8dfc 100644 --- a/core/http/src/uri/uri_display.rs +++ b/core/http/src/uri/uri_display.rs @@ -106,7 +106,7 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter}; /// seen, the implementations will be used to display the value in a URI-safe /// manner. /// -/// [`uri!`]: ../../../rocket_codegen/macro.uri.html +/// [`uri!`]: ../../../rocket/macro.uri.html /// /// # Provided Implementations /// @@ -201,11 +201,13 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter}; /// As long as every field in the structure (or enum) implements `UriDisplay`, /// the trait can be derived. The implementation calls /// [`Formatter::write_named_value()`] for every named field and -/// [`Formatter::write_value()`] for every unnamed field. See the [`UriDisplay` -/// derive] documentation for full details. +/// [`Formatter::write_value()`] for every unnamed field. See the +/// [`UriDisplay`] and [`UriDisplay`] derive documentation for full +/// details. /// /// [`Ignorable`]: crate::uri::Ignorable -/// [`UriDisplay` derive]: ../../../rocket_codegen/derive.UriDisplay.html +/// [`UriDisplay`]: ../../derive.UriDisplayPath.html +/// [`UriDisplay`]: ../../derive.UriDisplayQuery.html /// [`Formatter::write_named_value()`]: crate::uri::Formatter::write_named_value() /// [`Formatter::write_value()`]: crate::uri::Formatter::write_value() /// diff --git a/core/lib/src/request/form/form_items.rs b/core/lib/src/request/form/form_items.rs index ac8141db..f1d5c635 100644 --- a/core/lib/src/request/form/form_items.rs +++ b/core/lib/src/request/form/form_items.rs @@ -39,7 +39,7 @@ use crate::http::RawStr; /// /// This iterator returns values of the type [`FormItem`]. To access the /// associated key/value pairs of the form item, either directly access them via -/// the [`key`](FormItem.key) and [`value`](FormItem.value) fields, use the +/// the [`key`](FormItem::key) and [`value`](FormItem::value) fields, use the /// [`FormItem::key_value()`] method to get a tuple of the _raw_ `(key, value)`, /// or use the [`key_value_decoded()`](FormItem::key_value_decoded()) method to /// get a tuple of the decoded (`key`, `value`). diff --git a/core/lib/src/response/mod.rs b/core/lib/src/response/mod.rs index 535cd92a..eaeb238e 100644 --- a/core/lib/src/response/mod.rs +++ b/core/lib/src/response/mod.rs @@ -16,9 +16,12 @@ //! //! # Contrib //! -//! The [`contrib` crate](rocket_contrib) contains several useful `Responder`s -//! including [`Template`](rocket_contrib::Template) and -//! [`Json`](rocket_contrib::Json). +//! The [`contrib` crate] contains several useful `Responder`s including +//! [`Template`] and [`Json`]. +//! +//! [`contrib` crate]: ../../rocket_contrib +//! [`Template`]: ../../rocket_contrib/templates/struct.Template.html +//! [`Json`]: ../../rocket_contrib/json/struct.Json.html mod responder; mod redirect; diff --git a/core/lib/src/response/redirect.rs b/core/lib/src/response/redirect.rs index 66fde42c..bfecf274 100644 --- a/core/lib/src/response/redirect.rs +++ b/core/lib/src/response/redirect.rs @@ -41,8 +41,8 @@ use crate::http::Status; /// } /// ``` /// -/// [`Origin`]: crate::http::uri::Origin -/// [`uri!`]: ../../rocket_codegen/macro.uri.html +/// [`Origin`]: crate::::http::uri::Origin +/// [`uri!`]: ../macro.uri.html #[derive(Debug)] pub struct Redirect(Status, Option>); diff --git a/site/guide/4-requests.md b/site/guide/4-requests.md index 0778980f..8ec65f91 100644 --- a/site/guide/4-requests.md +++ b/site/guide/4-requests.md @@ -29,7 +29,7 @@ validations. Rocket's code generation takes care of actually validating the properties. This section describes how to ask Rocket to validate against all of these properties and more. -[`route`]: @api/rocket_codegen/attr.route.html +[`route`]: @api/rocket/attr.route.html ## Methods @@ -46,8 +46,7 @@ to the root path: # fn handler() {} ``` -The grammar for these attributes is defined formally in the -[`rocket_codegen`](@api/rocket_codegen/attr.route.html) API docs. +The grammar for these attributes is defined formally in the [`route`] API docs. ### HEAD Requests @@ -1150,8 +1149,8 @@ Unlike route request handlers, catchers take exactly zero or one parameter. If the catcher takes a parameter, it must be of type [`&Request`]. The [error catcher example](@example/errors) on GitHub illustrates their use in full. -[`catch`]: @api/rocket_codegen/attr.catch.html +[`catch`]: @api/rocket/attr.catch.html [`register()`]: @api/rocket/struct.Rocket.html#method.register [`mount()`]: @api/rocket/struct.Rocket.html#method.mount -[`catchers!`]: @api/rocket_codegen/macro.catchers.html +[`catchers!`]: @api/rocket/macro.catchers.html [`&Request`]: @api/rocket/struct.Request.html diff --git a/site/guide/5-responses.md b/site/guide/5-responses.md index 14fde9d9..d9f5917c 100644 --- a/site/guide/5-responses.md +++ b/site/guide/5-responses.md @@ -159,7 +159,7 @@ simply including fields of these types. For more on using the `Responder` derive, see the [`Responder` derive] documentation. -[`Responder` derive]: @api/rocket_codegen/derive.Responder.html +[`Responder` derive]: @api/rocket/derive.Responder.html ## Implementations @@ -647,11 +647,11 @@ See the [`FromUriParam`] documentation for further details. [`UriPart`]: @api/rocket/http/uri/trait.UriPart.html [`Uri`]: @api/rocket/http/uri/enum.Uri.html [`Redirect::to()`]: @api/rocket/response/struct.Redirect.html#method.to -[`uri!`]: @api/rocket_codegen/macro.uri.html +[`uri!`]: @api/rocket/macro.uri.html [`UriDisplay`]: @api/rocket/http/uri/trait.UriDisplay.html [`FromUriParam`]: @api/rocket/http/uri/trait.FromUriParam.html [`Path`]: @api/rocket/http/uri/enum.Path.html [`Query`]: @api/rocket/http/uri/enum.Query.html [`Ignorable`]: @api/rocket/http/uri/trait.Ignorable.html -[`UriDisplayPath`]: @api/rocket_codegen/derive.UriDisplayPath.html -[`UriDisplayQuery`]: @api/rocket_codegen/derive.UriDisplayQuery.html +[`UriDisplayPath`]: @api/rocket/derive.UriDisplayPath.html +[`UriDisplayQuery`]: @api/rocket/derive.UriDisplayQuery.html