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
Update the dependencies for actix-web-4.5.1 to use rustls-0.23.1 and have it compile successfully
Current Behavior
After updating the dependencies for actix-web-4.5.1 to use rustls-0.23.1, it fails with the following error:
error[E0282]: type annotations needed
--> /Users/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/app_service.rs:267:17
|
267 | Ok((path, guards, service))
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
|
help: consider specifying the generic arguments
|
267 | Ok::<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn actix_service::Service<ServiceRequest, Error = error::error::Error, Future = std::pin::Pin<Box<(dyn futures_core::Future<Output = std::result::Result<ServiceResponse, error::error::Error>> + 'static)>>, Response = ServiceResponse>>), E>((path, guards, service))
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0283]: type annotations needed
--> /Users/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/app_service.rs:267:17
|
266 | let service = factory_fut.await?;
| - type must be known at this point
267 | Ok((path, guards, service))
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
|
= note: multiple `impl`s satisfying `_: From<()>` found in the following crates: `aws_lc_rs`, `serde_json`:
- impl From<()> for Value;
- impl From<()> for aws_lc_rs::error::KeyRejected;
- impl From<()> for aws_lc_rs::error::Unspecified;
= note: required for `Result<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn Service<ServiceRequest, Error = Error, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse, ...>>>>, Response = ...>>), ...>` to implement `FromResidual<std::result::Result<std::convert::Infallible, ()>>`
= note: the full type name has been written to '/Users/myself/git-workplace/actix-tls-example/target/debug/deps/actix_web-7962e616c7d035ff.long-type-2618429493372448216.txt'
help: consider specifying the generic arguments
|
267 | Ok::<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn actix_service::Service<ServiceRequest, Error = error::error::Error, Future = std::pin::Pin<Box<(dyn futures_core::Future<Output = std::result::Result<ServiceResponse, error::error::Error>> + 'static)>>, Response = ServiceResponse>>), E>((path, guards, service))
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0283]: type annotations needed
--> /Users/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/app_service.rs:267:17
|
267 | Ok((path, guards, service))
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
...
281 | .collect::<Result<Vec<_>, _>>()?
| - type must be known at this point
|
= note: multiple `impl`s satisfying `(): From<_>` found in the following crates: `aws_lc_rs`, `core`:
- impl From<aws_lc_rs::error::Unspecified> for ();
- impl<T> From<!> for T;
- impl<T> From<T> for T;
= note: required for `std::result::Result<AppRouting, ()>` to implement `FromResidual<std::result::Result<std::convert::Infallible, _>>`
help: consider specifying the generic arguments
|
267 | Ok::<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn actix_service::Service<ServiceRequest, Error = error::error::Error, Future = std::pin::Pin<Box<(dyn futures_core::Future<Output = std::result::Result<ServiceResponse, error::error::Error>> + 'static)>>, Response = ServiceResponse>>), E>((path, guards, service))
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0283]: type annotations needed
--> /Users/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/scope.rs:474:17
|
473 | let service = factory_fut.await?;
| - type must be known at this point
474 | Ok((path, guards, service))
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
|
= note: multiple `impl`s satisfying `_: From<()>` found in the following crates: `aws_lc_rs`, `serde_json`:
- impl From<()> for Value;
- impl From<()> for aws_lc_rs::error::KeyRejected;
- impl From<()> for aws_lc_rs::error::Unspecified;
= note: required for `Result<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn Service<ServiceRequest, Error = Error, Future = Pin<Box<dyn Future<Output = Result<ServiceResponse, ...>>>>, Response = ...>>), ...>` to implement `FromResidual<std::result::Result<std::convert::Infallible, ()>>`
= note: the full type name has been written to '/Users/myself/git-workplace/actix-tls-example/target/debug/deps/actix_web-7962e616c7d035ff.long-type-5950418878366739901.txt'
help: consider specifying the generic arguments
|
474 | Ok::<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn actix_service::Service<ServiceRequest, Error = error::error::Error, Future = std::pin::Pin<Box<(dyn futures_core::Future<Output = std::result::Result<ServiceResponse, error::error::Error>> + 'static)>>, Response = ServiceResponse>>), E>((path, guards, service))
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0283]: type annotations needed
--> /Users/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/scope.rs:474:17
|
474 | Ok((path, guards, service))
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
...
485 | .collect::<Result<Vec<_>, _>>()?
| - type must be known at this point
|
= note: multiple `impl`s satisfying `(): From<_>` found in the following crates: `aws_lc_rs`, `core`:
- impl From<aws_lc_rs::error::Unspecified> for ();
- impl<T> From<!> for T;
- impl<T> From<T> for T;
= note: required for `std::result::Result<ScopeService, ()>` to implement `FromResidual<std::result::Result<std::convert::Infallible, _>>`
help: consider specifying the generic arguments
|
474 | Ok::<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn actix_service::Service<ServiceRequest, Error = error::error::Error, Future = std::pin::Pin<Box<(dyn futures_core::Future<Output = std::result::Result<ServiceResponse, error::error::Error>> + 'static)>>, Response = ServiceResponse>>), E>((path, guards, service))
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0282]: type annotations needed
--> /Users/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/scope.rs:474:17
|
474 | Ok((path, guards, service))
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
|
help: consider specifying the generic arguments
|
474 | Ok::<(ResourceDef, Vec<Box<dyn Guard>>, Box<dyn actix_service::Service<ServiceRequest, Error = error::error::Error, Future = std::pin::Pin<Box<(dyn futures_core::Future<Output = std::result::Result<ServiceResponse, error::error::Error>> + 'static)>>, Response = ServiceResponse>>), E>((path, guards, service))
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Some errors have detailed explanations: E0282, E0283.
For more information about an error, try `rustc --explain E0282`.
However, there seems to be some compiler confusion where rust can't tell whether or not the tuple Ok((path, guards, service)) in both the app_service.rs & scope.rs is casted to a struct from the serder_json crate or the aws-lc-rs crate.
My rust is very entry-level, but I'm hoping the fix can be as straightforward as adding an explicit cast to allow the compile to work as expected
I'm trying to set-up an HTTPS server that is FIPS compliant. I was hoping to use the bind_rusttls_022 function to use the latest rustls version, which is FIPS certified via the aws-lc-rs library
Your Environment
Rust Version (I.e, output of rustc -V): rustc 1.76.0 (07dca489a 2024-02-04)
Actix Web Version:v 4.5.1
The text was updated successfully, but these errors were encountered:
Expected Behavior
Update the dependencies for
actix-web-4.5.1
to userustls-0.23.1
and have it compile successfullyCurrent Behavior
After updating the dependencies for
actix-web-4.5.1
to userustls-0.23.1
, it fails with the following error:Possible Solution
When
rustls
moved to 0.23.0, it introduced a dependency onaws-lc-rs
which is its new default cryptography provider.However, there seems to be some compiler confusion where rust can't tell whether or not the tuple
Ok((path, guards, service))
in both theapp_service.rs
&scope.rs
is casted to a struct from theserder_json
crate or theaws-lc-rs
crate.My rust is very entry-level, but I'm hoping the fix can be as straightforward as adding an explicit cast to allow the compile to work as expected
Steps to Reproduce (for bugs)
actix-web
's Cargo.toml file0.22
to0.23.1
cargo test
Context
I'm trying to set-up an HTTPS server that is FIPS compliant. I was hoping to use the
bind_rusttls_022
function to use the latestrustls
version, which is FIPS certified via theaws-lc-rs
libraryYour Environment
rustc -V
): rustc 1.76.0 (07dca489a 2024-02-04)The text was updated successfully, but these errors were encountered: