Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dropshot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rustls = "0.22.4"
rustls-pemfile = "2.1.3"
scopeguard = "1.2.0"
semver = "1.0.26"
serde_json = "1.0.143"
serde_json = "1.0.145"
serde_path_to_error = "0.1.17"
serde_urlencoded = "0.7.1"
sha1 = "0.10.6"
Expand Down
24 changes: 12 additions & 12 deletions dropshot/tests/fail/bad_channel4.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ note: required by a bound in `dropshot::Query`
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_channel4.rs:22:14
|
22 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunshowers @dtolnay is it kind of a bummer that we see serde_core:: rather than serde:: in error output now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I flagged this in serde-rs/serde#2608 (comment). @oli-obk may be able to say whether this case is a compiler bug.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea we shouldn't point to transitive dependencies if there is a direct dependency with the item in question reexported. The main message even gets this right, so I'll need to investigate whether the detailed message uses the full original path on purpose

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main message even gets this right

It probably doesn't, the main message is from serde-rs/serde#2963.

|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -38,7 +38,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down Expand Up @@ -71,19 +71,19 @@ note: required by a bound in `dropshot::Query`
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_channel4.rs:20:1
|
20 | / async fn bad_channel(
21 | | _rqctx: RequestContext<()>,
22 | | _params: Query<QueryParams>,
23 | | _upgraded: WebsocketConnection,
24 | | ) -> dropshot::WebsocketChannelResult {
| |_____________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| |_____________________________________^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -93,7 +93,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down Expand Up @@ -126,18 +126,18 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `channel` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_channel4.rs:16:1
|
16 | / #[channel {
17 | | protocol = WEBSOCKETS,
18 | | path = "/test",
19 | | }]
| |__^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| |__^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -147,7 +147,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down
24 changes: 12 additions & 12 deletions dropshot/tests/fail/bad_channel5.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_channel5.rs:24:14
|
24 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -16,26 +16,26 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_channel5.rs:22:1
|
22 | / async fn bad_channel(
23 | | _rqctx: RequestContext<()>,
24 | | _params: Query<QueryParams>,
25 | | _upgraded: WebsocketConnection,
26 | | ) -> dropshot::WebsocketChannelResult {
| |_____________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| |_____________________________________^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -45,25 +45,25 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_channel5.rs:18:1
|
18 | / #[channel {
19 | | protocol = WEBSOCKETS,
20 | | path = "/test",
21 | | }]
| |__^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| |__^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -73,7 +73,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down
24 changes: 12 additions & 12 deletions dropshot/tests/fail/bad_endpoint4.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ note: required by a bound in `dropshot::Query`
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_endpoint4.rs:23:14
|
23 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -38,7 +38,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down Expand Up @@ -70,18 +70,18 @@ note: required by a bound in `dropshot::Query`
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_endpoint4.rs:21:1
|
21 | / async fn bad_endpoint(
22 | | _rqctx: RequestContext<()>,
23 | | _params: Query<QueryParams>,
24 | | ) -> Result<HttpResponseOk<()>, HttpError> {
| |__________________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| |__________________________________________^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -91,7 +91,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down Expand Up @@ -145,18 +145,18 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
error[E0277]: the trait bound `QueryParams: serde::Deserialize<'de>` is not satisfied
--> tests/fail/bad_endpoint4.rs:17:1
|
17 | / #[endpoint {
18 | | method = GET,
19 | | path = "/test",
20 | | }]
| |__^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
| |__^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `QueryParams`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a camino::Utf8Path
&'a std::path::Path
Expand All @@ -166,7 +166,7 @@ error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
= note: required for `QueryParams` to implement `serde_core::de::DeserializeOwned`
note: required by a bound in `dropshot::Query`
--> src/extractor/query.rs
|
Expand Down
Loading
Loading