mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 06:54:46 +00:00
improve ui on invalid types for endpoints
This commit is contained in:
parent
90fc17e57d
commit
30edd349ed
9 changed files with 169 additions and 5 deletions
32
tests/ui/endpoint/invalid_params_ty.stderr
Normal file
32
tests/ui/endpoint/invalid_params_ty.stderr
Normal file
|
@ -0,0 +1,32 @@
|
|||
error[E0277]: the trait bound `for<'de> FooParams: serde::de::Deserialize<'de>` is not satisfied
|
||||
--> $DIR/invalid_params_ty.rs:15:16
|
||||
|
|
||||
15 | fn endpoint(_: FooParams) {
|
||||
| ^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `FooParams`
|
||||
|
|
||||
::: $WORKSPACE/src/endpoint.rs
|
||||
|
|
||||
| type Params: QueryStringExtractor<Body> + Sync;
|
||||
| -------------------------- required by this bound in `gotham_restful::Endpoint::Params`
|
||||
|
||||
error[E0277]: the trait bound `FooParams: StateData` is not satisfied
|
||||
--> $DIR/invalid_params_ty.rs:15:16
|
||||
|
|
||||
15 | fn endpoint(_: FooParams) {
|
||||
| ^^^^^^^^^ the trait `StateData` is not implemented for `FooParams`
|
||||
|
|
||||
::: $WORKSPACE/src/endpoint.rs
|
||||
|
|
||||
| type Params: QueryStringExtractor<Body> + Sync;
|
||||
| -------------------------- required by this bound in `gotham_restful::Endpoint::Params`
|
||||
|
||||
error[E0277]: the trait bound `FooParams: StaticResponseExtender` is not satisfied
|
||||
--> $DIR/invalid_params_ty.rs:15:16
|
||||
|
|
||||
15 | fn endpoint(_: FooParams) {
|
||||
| ^^^^^^^^^ the trait `StaticResponseExtender` is not implemented for `FooParams`
|
||||
|
|
||||
::: $WORKSPACE/src/endpoint.rs
|
||||
|
|
||||
| type Params: QueryStringExtractor<Body> + Sync;
|
||||
| -------------------------- required by this bound in `gotham_restful::Endpoint::Params`
|
Loading…
Add table
Add a link
Reference in a new issue