Update docs.rs links to 0.8 (#3120)

This commit is contained in:
Tobias Bieniek 2024-12-27 13:15:58 +01:00 committed by GitHub
parent 09841ff895
commit 33b353def8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 24 additions and 24 deletions

View file

@ -66,8 +66,8 @@ use tower_layer::Layer;
/// ///
/// [`Body::poll_frame`]: http_body::Body::poll_frame /// [`Body::poll_frame`]: http_body::Body::poll_frame
/// [`Bytes`]: bytes::Bytes /// [`Bytes`]: bytes::Bytes
/// [`Json`]: https://docs.rs/axum/0.7/axum/struct.Json.html /// [`Json`]: https://docs.rs/axum/0.8/axum/struct.Json.html
/// [`Form`]: https://docs.rs/axum/0.7/axum/struct.Form.html /// [`Form`]: https://docs.rs/axum/0.8/axum/struct.Form.html
/// [`FromRequest`]: crate::extract::FromRequest /// [`FromRequest`]: crate::extract::FromRequest
/// [`RequestBodyLimit`]: tower_http::limit::RequestBodyLimit /// [`RequestBodyLimit`]: tower_http::limit::RequestBodyLimit
/// [`RequestExt::with_limited_body`]: crate::RequestExt::with_limited_body /// [`RequestExt::with_limited_body`]: crate::RequestExt::with_limited_body
@ -114,8 +114,8 @@ impl DefaultBodyLimit {
/// ``` /// ```
/// ///
/// [`Bytes`]: bytes::Bytes /// [`Bytes`]: bytes::Bytes
/// [`Json`]: https://docs.rs/axum/0.7/axum/struct.Json.html /// [`Json`]: https://docs.rs/axum/0.8/axum/struct.Json.html
/// [`Form`]: https://docs.rs/axum/0.7/axum/struct.Form.html /// [`Form`]: https://docs.rs/axum/0.8/axum/struct.Form.html
pub const fn disable() -> Self { pub const fn disable() -> Self {
Self { Self {
kind: DefaultBodyLimitKind::Disable, kind: DefaultBodyLimitKind::Disable,
@ -147,8 +147,8 @@ impl DefaultBodyLimit {
/// ``` /// ```
/// ///
/// [`Bytes::from_request`]: bytes::Bytes /// [`Bytes::from_request`]: bytes::Bytes
/// [`Json`]: https://docs.rs/axum/0.7/axum/struct.Json.html /// [`Json`]: https://docs.rs/axum/0.8/axum/struct.Json.html
/// [`Form`]: https://docs.rs/axum/0.7/axum/struct.Form.html /// [`Form`]: https://docs.rs/axum/0.8/axum/struct.Form.html
pub const fn max(limit: usize) -> Self { pub const fn max(limit: usize) -> Self {
Self { Self {
kind: DefaultBodyLimitKind::Limit(limit), kind: DefaultBodyLimitKind::Limit(limit),

View file

@ -7,7 +7,7 @@
/// ///
/// This trait can be derived using `#[derive(FromRef)]`. /// This trait can be derived using `#[derive(FromRef)]`.
/// ///
/// [`State`]: https://docs.rs/axum/0.7/axum/extract/struct.State.html /// [`State`]: https://docs.rs/axum/0.8/axum/extract/struct.State.html
// NOTE: This trait is defined in axum-core, even though it is mainly used with `State` which is // NOTE: This trait is defined in axum-core, even though it is mainly used with `State` which is
// defined in axum. That allows crate authors to use it when implementing extractors. // defined in axum. That allows crate authors to use it when implementing extractors.
pub trait FromRef<T> { pub trait FromRef<T> {

View file

@ -2,7 +2,7 @@
//! //!
//! See [`axum::extract`] for more details. //! See [`axum::extract`] for more details.
//! //!
//! [`axum::extract`]: https://docs.rs/axum/0.7/axum/extract/index.html //! [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html
use crate::{body::Body, response::IntoResponse}; use crate::{body::Body, response::IntoResponse};
use http::request::Parts; use http::request::Parts;
@ -46,11 +46,11 @@ mod private {
/// ///
/// See [`axum::extract`] for more general docs about extractors. /// See [`axum::extract`] for more general docs about extractors.
/// ///
/// [`axum::extract`]: https://docs.rs/axum/0.7/axum/extract/index.html /// [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html
#[rustversion::attr( #[rustversion::attr(
since(1.78), since(1.78),
diagnostic::on_unimplemented( diagnostic::on_unimplemented(
note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.7/axum/extract/index.html` for details", note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details",
) )
)] )]
pub trait FromRequestParts<S>: Sized { pub trait FromRequestParts<S>: Sized {
@ -75,11 +75,11 @@ pub trait FromRequestParts<S>: Sized {
/// ///
/// See [`axum::extract`] for more general docs about extractors. /// See [`axum::extract`] for more general docs about extractors.
/// ///
/// [`axum::extract`]: https://docs.rs/axum/0.7/axum/extract/index.html /// [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html
#[rustversion::attr( #[rustversion::attr(
since(1.78), since(1.78),
diagnostic::on_unimplemented( diagnostic::on_unimplemented(
note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.7/axum/extract/index.html` for details", note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details",
) )
)] )]
pub trait FromRequest<S, M = private::ViaRequest>: Sized { pub trait FromRequest<S, M = private::ViaRequest>: Sized {

View file

@ -53,7 +53,7 @@ where
/// ///
/// Prefer using [`TypedHeader`] to extract only the headers you need. /// Prefer using [`TypedHeader`] to extract only the headers you need.
/// ///
/// [`TypedHeader`]: https://docs.rs/axum/0.7/axum/extract/struct.TypedHeader.html /// [`TypedHeader`]: https://docs.rs/axum/0.8/axum/extract/struct.TypedHeader.html
impl<S> FromRequestParts<S> for HeaderMap impl<S> FromRequestParts<S> for HeaderMap
where where
S: Send + Sync, S: Send + Sync,

View file

@ -2,7 +2,7 @@
//! //!
//! See [`axum::response`] for more details. //! See [`axum::response`] for more details.
//! //!
//! [`axum::response`]: https://docs.rs/axum/0.7/axum/response/index.html //! [`axum::response`]: https://docs.rs/axum/0.8/axum/response/index.html
use crate::body::Body; use crate::body::Body;

View file

@ -369,9 +369,9 @@ use from_request::Trait::{FromRequest, FromRequestParts};
/// } /// }
/// ``` /// ```
/// ///
/// [`FromRequest`]: https://docs.rs/axum/0.7/axum/extract/trait.FromRequest.html /// [`FromRequest`]: https://docs.rs/axum/0.8/axum/extract/trait.FromRequest.html
/// [`axum::response::Response`]: https://docs.rs/axum/0.7/axum/response/type.Response.html /// [`axum::response::Response`]: https://docs.rs/axum/0.8/axum/response/type.Response.html
/// [`axum::extract::rejection::ExtensionRejection`]: https://docs.rs/axum/0.7/axum/extract/rejection/enum.ExtensionRejection.html /// [`axum::extract::rejection::ExtensionRejection`]: https://docs.rs/axum/0.8/axum/extract/rejection/enum.ExtensionRejection.html
#[proc_macro_derive(FromRequest, attributes(from_request))] #[proc_macro_derive(FromRequest, attributes(from_request))]
pub fn derive_from_request(item: TokenStream) -> TokenStream { pub fn derive_from_request(item: TokenStream) -> TokenStream {
expand_with(item, |item| from_request::expand(item, FromRequest)) expand_with(item, |item| from_request::expand(item, FromRequest))
@ -420,7 +420,7 @@ pub fn derive_from_request(item: TokenStream) -> TokenStream {
/// ///
/// Use `#[derive(FromRequest)]` for that. /// Use `#[derive(FromRequest)]` for that.
/// ///
/// [`FromRequestParts`]: https://docs.rs/axum/0.7/axum/extract/trait.FromRequestParts.html /// [`FromRequestParts`]: https://docs.rs/axum/0.8/axum/extract/trait.FromRequestParts.html
#[proc_macro_derive(FromRequestParts, attributes(from_request))] #[proc_macro_derive(FromRequestParts, attributes(from_request))]
pub fn derive_from_request_parts(item: TokenStream) -> TokenStream { pub fn derive_from_request_parts(item: TokenStream) -> TokenStream {
expand_with(item, |item| from_request::expand(item, FromRequestParts)) expand_with(item, |item| from_request::expand(item, FromRequestParts))
@ -569,8 +569,8 @@ pub fn derive_from_request_parts(item: TokenStream) -> TokenStream {
/// This macro has no effect when compiled with the release profile. (eg. `cargo build --release`) /// This macro has no effect when compiled with the release profile. (eg. `cargo build --release`)
/// ///
/// [`axum`]: https://docs.rs/axum/0.7 /// [`axum`]: https://docs.rs/axum/0.7
/// [`Handler`]: https://docs.rs/axum/0.7/axum/handler/trait.Handler.html /// [`Handler`]: https://docs.rs/axum/0.8/axum/handler/trait.Handler.html
/// [`axum::extract::State`]: https://docs.rs/axum/0.7/axum/extract/struct.State.html /// [`axum::extract::State`]: https://docs.rs/axum/0.8/axum/extract/struct.State.html
/// [`debug_handler`]: macro@debug_handler /// [`debug_handler`]: macro@debug_handler
#[proc_macro_attribute] #[proc_macro_attribute]
pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream { pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream {
@ -626,7 +626,7 @@ pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream {
/// This macro has no effect when compiled with the release profile. (eg. `cargo build --release`) /// This macro has no effect when compiled with the release profile. (eg. `cargo build --release`)
/// ///
/// [`axum`]: https://docs.rs/axum/latest /// [`axum`]: https://docs.rs/axum/latest
/// [`axum::middleware::from_fn`]: https://docs.rs/axum/0.7/axum/middleware/fn.from_fn.html /// [`axum::middleware::from_fn`]: https://docs.rs/axum/0.8/axum/middleware/fn.from_fn.html
/// [`debug_middleware`]: macro@debug_middleware /// [`debug_middleware`]: macro@debug_middleware
#[proc_macro_attribute] #[proc_macro_attribute]
pub fn debug_middleware(_attr: TokenStream, input: TokenStream) -> TokenStream { pub fn debug_middleware(_attr: TokenStream, input: TokenStream) -> TokenStream {
@ -709,7 +709,7 @@ pub fn derive_typed_path(input: TokenStream) -> TokenStream {
/// # let _: axum::Router = app; /// # let _: axum::Router = app;
/// ``` /// ```
/// ///
/// [`FromRef`]: https://docs.rs/axum/0.7/axum/extract/trait.FromRef.html /// [`FromRef`]: https://docs.rs/axum/0.8/axum/extract/trait.FromRef.html
#[proc_macro_derive(FromRef, attributes(from_ref))] #[proc_macro_derive(FromRef, attributes(from_ref))]
pub fn derive_from_ref(item: TokenStream) -> TokenStream { pub fn derive_from_ref(item: TokenStream) -> TokenStream {
expand_with(item, from_ref::expand) expand_with(item, from_ref::expand)

View file

@ -5,7 +5,7 @@ error[E0277]: the trait bound `bool: FromRequest<(), axum_core::extract::private
| ^^^^ the trait `FromRequestParts<()>` is not implemented for `bool`, which is required by `bool: FromRequest<(), _>` | ^^^^ the trait `FromRequestParts<()>` is not implemented for `bool`, which is required by `bool: FromRequest<(), _>`
| |
= note: Function argument is not a valid axum extractor. = note: Function argument is not a valid axum extractor.
See `https://docs.rs/axum/0.7/axum/extract/index.html` for details See `https://docs.rs/axum/0.8/axum/extract/index.html` for details
= help: the following other types implement trait `FromRequestParts<S>`: = help: the following other types implement trait `FromRequestParts<S>`:
`()` implements `FromRequestParts<S>` `()` implements `FromRequestParts<S>`
`(T1, T2)` implements `FromRequestParts<S>` `(T1, T2)` implements `FromRequestParts<S>`

View file

@ -5,7 +5,7 @@ error[E0277]: the trait bound `String: FromRequestParts<_>` is not satisfied
| ^^^^^^ the trait `FromRequestParts<_>` is not implemented for `String` | ^^^^^^ the trait `FromRequestParts<_>` is not implemented for `String`
| |
= note: Function argument is not a valid axum extractor. = note: Function argument is not a valid axum extractor.
See `https://docs.rs/axum/0.7/axum/extract/index.html` for details See `https://docs.rs/axum/0.8/axum/extract/index.html` for details
= help: the following other types implement trait `FromRequestParts<S>`: = help: the following other types implement trait `FromRequestParts<S>`:
`()` implements `FromRequestParts<S>` `()` implements `FromRequestParts<S>`
`(T1, T2)` implements `FromRequestParts<S>` `(T1, T2)` implements `FromRequestParts<S>`