Refactor proc-macro attribute parsing (#1369)

* Refactor proc-macro attribute parsing

* Remove `#[allow(warnings)]` which was accidentally committed

* Change span for "cannot use `rejection` without `via`" error for enums

* fix test
This commit is contained in:
David Pedersen
2022-09-12 20:10:58 +02:00
committed by GitHub
parent 54d8439e35
commit 8da69a98fc
5 changed files with 156 additions and 177 deletions
@@ -1,8 +1,8 @@
error: cannot use `rejection` without `via`
--> tests/from_request/fail/override_rejection_on_enum_without_via.rs:18:26
--> tests/from_request/fail/override_rejection_on_enum_without_via.rs:18:16
|
18 | #[from_request(rejection(MyRejection))]
| ^^^^^^^^^^^
| ^^^^^^^^^
error[E0277]: the trait bound `fn(MyExtractor) -> impl Future<Output = ()> {handler}: Handler<_, _, _>` is not satisfied
--> tests/from_request/fail/override_rejection_on_enum_without_via.rs:10:50