Open
Description
Hi there,
we just noticed on warp
CI that one of the examples was broken (we have #![deny(warnings)]
for the examples). The output is as follows:
warning: opaque type `impl warp::Filter + warp::filter::FilterBase<Extract = impl Reply, Error = Rejection> + Clone` does not satisfy its associated type bounds
--> examples/todos.rs:39:22
|
39 | ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: /home/jxs/dev/oss/warp/src/filter/mod.rs:40:19
|
40 | type Extract: Tuple; // + Send;
| ----- this associated type bound is unsatisfied for `impl Reply`
|
= note: `#[warn(opaque_hidden_inferred_bound)]` on by default
help: add this bound
|
39 | ) -> impl Filter<Extract = impl warp::Reply + warp::generic::Tuple, Error = warp::Rejection> + Clone {
| ++++++++++++++++++++++
warning: opaque type `impl warp::Filter + warp::filter::FilterBase<Extract = impl Reply, Error = Rejection> + Clone` does not satisfy its associated type bounds
--> examples/todos.rs:49:22
|
49 | ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: /home/jxs/dev/oss/warp/src/filter/mod.rs:40:19
|
40 | type Extract: Tuple; // + Send;
| ----- this associated type bound is unsatisfied for `impl Reply`
|
help: add this bound
|
49 | ) -> impl Filter<Extract = impl warp::Reply + warp::generic::Tuple, Error = warp::Rejection> + Clone {
| ++++++++++++++++++++++
warning: opaque type `impl warp::Filter + warp::filter::FilterBase<Extract = impl Reply, Error = Rejection> + Clone` does not satisfy its associated type bounds
--> examples/todos.rs:60:22
|
60 | ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: /home/jxs/dev/oss/warp/src/filter/mod.rs:40:19
|
40 | type Extract: Tuple; // + Send;
| ----- this associated type bound is unsatisfied for `impl Reply`
|
help: add this bound
|
60 | ) -> impl Filter<Extract = impl warp::Reply + warp::generic::Tuple, Error = warp::Rejection> + Clone {
| ++++++++++++++++++++++
warning: opaque type `impl warp::Filter + warp::filter::FilterBase<Extract = impl Reply, Error = Rejection> + Clone` does not satisfy its associated type bounds
--> examples/todos.rs:71:22
|
71 | ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: /home/jxs/dev/oss/warp/src/filter/mod.rs:40:19
|
40 | type Extract: Tuple; // + Send;
| ----- this associated type bound is unsatisfied for `impl Reply`
|
help: add this bound
|
71 | ) -> impl Filter<Extract = impl warp::Reply + warp::generic::Tuple, Error = warp::Rejection> + Clone {
| ++++++++++++++++++++++
warning: opaque type `impl warp::Filter + warp::filter::FilterBase<Extract = impl Reply, Error = Rejection> + Clone` does not satisfy its associated type bounds
--> examples/todos.rs:82:22
|
82 | ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: /home/jxs/dev/oss/warp/src/filter/mod.rs:40:19
|
40 | type Extract: Tuple; // + Send;
| ----- this associated type bound is unsatisfied for `impl Reply`
|
help: add this bound
|
82 | ) -> impl Filter<Extract = impl warp::Reply + warp::generic::Tuple, Error = warp::Rejection> + Clone {
| ++++++++++++++++++++++
It seems to have been introduced with Rust version 1.66
as with 1.65
the example compiles fine. I also tried with the latest nightly (cargo 1.69.0-nightly (e84a7928d 2023-01-31)
) which still reproduces the problem. This feels like a bug as it being a warning doesn't provide help, btw warp::generic::Tuple
is private.
The todos
example should work as a MRE, but if required I can try to provide a simpler use case.
Thanks!