#465·oha

在 rustc 1.76.0 上编译 v1.4.3 失败

作者: Phaqui创建于 2024年4月18日更新于 2025年9月6日

user@debian:~$ cargo install oha Updating crates.io index Downloaded oha v1.4.3 Downloaded 1 crate (757.7 KB) in 1.83s Installing oha v1.4.3 Updating crates.io index [[ ... Many lines of downloading and compiling dependencies ... ]] Compiling oha v1.4.3 error[E0733]: recursion in an async fn requires boxing --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/oha-1.4.3/src/client.rs:629:5 | 629 | / async fn redirect<R: Rng + Send>( 630 | | &self, 631 | | send_request: SendRequestHttp1, 632 | | base_url: &Url, ... | 635 | | rng: &mut R, 636 | | ) -> Result<(SendRequestHttp1, http::StatusCode, usize), ClientError> { | |_________________________________________________________________________^ recursive async fn | = note: a recursive async fn must be rewritten to return a boxed dyn Future = note: consider using the async_recursion crate: https://crates.io/crates/async_recursion For more information about this error, try rustc --explain E0733. error: could not compile oha (bin "oha") due to 1 previous error error: failed to compile oha v1.4.3, intermediate artifacts can be found at /tmp/cargo-installZcfcP7. To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.