Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile v1.4.3 on rustc 1.76.0 #465

Open
Phaqui opened this issue Apr 18, 2024 · 1 comment
Open

Failed to compile v1.4.3 on rustc 1.76.0 #465

Phaqui opened this issue Apr 18, 2024 · 1 comment

Comments

@Phaqui
Copy link

Phaqui commented Apr 18, 2024

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.

If there's any help it in, my system is:

user@debian:~$ rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
user@debian:~$ uname -a
Linux debian 6.1.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) x86_64 GNU/Linux
user@debian:~$ lsb_release -d
No LSB modules are available.
Description:    Debian GNU/Linux trixie/sid
@hatoo
Copy link
Owner

hatoo commented Apr 18, 2024

Since oha is using https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html#support-for-recursion-in-async-fn
You need rust 1.77 to compile it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants