Update 'devise', fix 'Responder' derive generics.

This commit is contained in:
Sergio Benitez 2021-08-08 14:08:06 -07:00
parent 80cd30086a
commit 4b272f19ba
3 changed files with 18 additions and 3 deletions

View File

@ -19,7 +19,7 @@ indexmap = "1.0"
quote = "1.0" quote = "1.0"
syn = { version = "1.0.72", features = ["full", "visit", "visit-mut", "extra-traits"] } syn = { version = "1.0.72", features = ["full", "visit", "visit-mut", "extra-traits"] }
proc-macro2 = "1.0.27" proc-macro2 = "1.0.27"
devise = "0.3" devise = "0.3.1"
rocket_http = { version = "0.5.0-rc.1", path = "../http/" } rocket_http = { version = "0.5.0-rc.1", path = "../http/" }
unicode-xid = "0.2" unicode-xid = "0.2"
glob = "0.3" glob = "0.3"

View File

@ -687,8 +687,8 @@ pub fn derive_from_form_field(input: TokenStream) -> TokenStream {
/// } /// }
/// ``` /// ```
/// ///
/// [`FromForm`]: rocket::form::FromForm /// [`FromForm`]: ../rocket/form/trait.FromForm.html
/// [`form::Errors`]: rocket::form::Errors /// [`form::Errors`]: ../rocket/form/struct.Errors.html
/// ///
/// # Generics /// # Generics
/// ///

View File

@ -49,4 +49,19 @@ struct Thing12(());
#[response(status = 404, content_type = 120)] #[response(status = 404, content_type = 120)]
struct Thing13(()); struct Thing13(());
#[derive(Responder)] // NO ERROR
enum Error<'r, T> {
#[response(status = 400)]
Unauthorized(T),
#[response(status = 404)]
NotFound(rocket::fs::NamedFile),
#[response(status = 500)]
A(&'r str, rocket::http::ContentType),
}
#[derive(Responder)] // NO ERROR
enum Error2<'r, T> {
Unauthorized(&'r T),
}
fn main() {} fn main() {}