You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow opaque_hidden_inferred_bound warning on nightly (#2275)
Currently, our nightly builds are failing due to the new warning
`opaque_hidden_inferred_bound`, which triggers when an opaque type
(`impl Trait`) in an associated type position does not explicitly
include the associated type's trait bounds (e.g. returning a
`Service<Future = impl Send, ...>`) or similar.
Unfortunately, we cannot simply change our code to make the trait
bound's type explicit, as changing `impl Send` to `impl Future<...> +
Send` in this position results in a surprising error which I don't think
is correct:
```
error[E0277]: `impl std::marker::Send` is not a future
--> linkerd/app/outbound/src/http/logical.rs:97:30
|
97 | Future = impl Future<Output = Result<http::Response<http::BoxBody>, Error>> + Send,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `impl std::marker::Send` is not a future
|
= help: the trait `futures::Future` is not implemented for `impl std::marker::Send`
= note: impl std::marker::Send must be a future or must implement `IntoFuture` to be awaited
= note: required for `stack::map_err::ResponseFuture<(), impl std::marker::Send>` to implement `futures::Future`
For more information about this error, try `rustc --explain E0277`.
```
See
#2268 (comment)
as well as the upstream Rust issue rust-lang/rust#107729, for details.
This should probably be reported on the Rust issue tracker, since a
warning that's (apparently) impossible to fix seems not great. However,
for now, we can simply allow this warning for our nightly builds.
This should fix CI.
0 commit comments