无法通过添加“aws-sdk-apigatewaymanagement”来构建我的项目。我该如何解决这个问题?

问题描述 投票:0回答:1

cargo build
添加到我的项目后,我在使用
aws-sdk-apigatewaymanagement
构建项目时遇到问题。我通过检查之前的提交发现了这个问题,该提交构建并运行正常,但我没有添加
aws-sdk-apigatewaymanagement
包。将包添加到此分支并再次运行时,出现此错误。

这是错误

   Compiling aws-smithy-runtime v1.3.1
error[E0446]: private type `UploadThroughputCheckFuture` in public interface
   --> /Users/amanr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-smithy-runtime-1.3.1/src/client/http/body/minimum_throughput.rs:333:1
    |
213 | / pin_project_lite::pin_project! {
214 | |     /// Future that pairs with [`UploadThroughput`] to add a minimum throughput
215 | |     /// requirement to a request upload stream.
216 | |     struct UploadThroughputCheckFuture {
...   |
231 | |     }
232 | | }
    | |_- `UploadThroughputCheckFuture` declared as private
...
333 | / pin_project_lite::pin_project! {
334 | |     #[project = EnumProj]
335 | |     pub(crate) enum MaybeUploadThroughputCheckFuture {
336 | |         Direct { #[pin] future: HttpConnectorFuture },
337 | |         Checked { #[pin] future: UploadThroughputCheckFuture },
338 | |     }
339 | | }
    | |_^ can't leak private type
    |
    = note: this error originates in the macro `$crate::__pin_project_reconstruct` which comes from the expansion of the macro `pin_project_lite::pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0446]: private type `UploadThroughputCheckFuture` in public interface
   --> /Users/amanr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-smithy-runtime-1.3.1/src/client/http/body/minimum_throughput.rs:333:1
    |
213 | / pin_project_lite::pin_project! {
214 | |     /// Future that pairs with [`UploadThroughput`] to add a minimum throughput
215 | |     /// requirement to a request upload stream.
216 | |     struct UploadThroughputCheckFuture {
...   |
231 | |     }
232 | | }
    | |_- `UploadThroughputCheckFuture` declared as private
...
333 | / pin_project_lite::pin_project! {
334 | |     #[project = EnumProj]
335 | |     pub(crate) enum MaybeUploadThroughputCheckFuture {
336 | |         Direct { #[pin] future: HttpConnectorFuture },
337 | |         Checked { #[pin] future: UploadThroughputCheckFuture },
338 | |     }
339 | | }
    | |_^ can't leak private type
    |
    = note: this error originates in the macro `$crate::__pin_project_make_proj_ty` which comes from the expansion of the macro `pin_project_lite::pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0446`.
error: could not compile `aws-smithy-runtime` (lib) due to 2 previous errors

即使从我的 Cargo.toml 中删除

aws-sdk-apigatewaymanagement
,此错误仍然存在。我还通过使用
cargo new
创建一个新项目并仅添加
aws-sdk-apigatewaymanagement
箱子来测试这一点。构建时也会出现同样的错误。

如何解决这个问题?

amazon-web-services rust aws-api-gateway aws-sdk aws-sdk-rust
1个回答
0
投票

只需使用 rustup 更新 rust 即可解决问题

© www.soinside.com 2019 - 2024. All rights reserved.