Support #[derive(FromRequest)] on enums (#1009)

* Support `#[from_request(via(...))]` on enums

* Check `#[from_request]` on variants

* check for non enum/struct and clean up

* changelog

* changelog

* remove needless feature

* changelog ref
This commit is contained in:
David Pedersen
2022-05-08 20:04:56 +02:00
committed by GitHub
parent a3a32f493e
commit 852e548e19
14 changed files with 215 additions and 25 deletions
@@ -0,0 +1,5 @@
error: cannot use `rejection_derive` on enums
--> tests/from_request/fail/enum_rejection_derive.rs:4:16
|
4 | #[from_request(rejection_derive(!Error))]
| ^^^^^^^^^^^^^^^^