mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 14:57:01 +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
13
tests/ui/endpoint/invalid_body_ty.stderr
Normal file
13
tests/ui/endpoint/invalid_body_ty.stderr
Normal file
|
@ -0,0 +1,13 @@
|
|||
error[E0277]: the trait bound `for<'de> FooBody: serde::de::Deserialize<'de>` is not satisfied
|
||||
--> $DIR/invalid_body_ty.rs:15:16
|
||||
|
|
||||
15 | fn endpoint(_: FooBody) {
|
||||
| ^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `FooBody`
|
||||
|
|
||||
::: $WORKSPACE/src/endpoint.rs
|
||||
|
|
||||
| type Body: RequestBody + Send;
|
||||
| ----------- required by this bound in `gotham_restful::Endpoint::Body`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `serde::de::DeserializeOwned` for `FooBody`
|
||||
= note: required because of the requirements on the impl of `RequestBody` for `FooBody`
|
Loading…
Add table
Add a link
Reference in a new issue