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

Project does not compile in Rust 1.85 edition 2024 #2

Open
Havunen opened this issue Jan 10, 2025 · 1 comment
Open

Project does not compile in Rust 1.85 edition 2024 #2

Havunen opened this issue Jan 10, 2025 · 1 comment

Comments

@Havunen
Copy link
Contributor

Havunen commented Jan 10, 2025

steps to reproduce:

add following to Cargo.toml

edition = "2024"
rust-version = "1.85.0"

and compile:

error[E0277]: the trait bound `!: IntoResponse` is not satisfied
    --> src/lib.rs:1236:34
     |
1236 |             .route("/fail2", get(|| async { panic!("panic") }))
     |                              --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoResponse` is not implemented for `!`
     |                              |
     |                              required by a bound introduced by this call
     |
     = help: the following other types implement trait `IntoResponse`:
               &'static [u8; N]
               &'static [u8]
               &'static str
               ()
               (R,)
               (StatusCode, R)
               (StatusCode, T1, R)
               (StatusCode, T1, T2, R)
             and 121 others
     = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
     = help: did you intend to use the type `()` here instead?
     = note: required for `{closure@src/lib.rs:1236:34: 1236:36}` to implement `Handler<((),), ()>`
note: required by a bound in `axum::routing::get`
    --> /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/axum-0.8.1/src/routing/method_routing.rs:440:1
     |
440  | top_level_handler_fn!(get, GET);
     | ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^
     | |                     |
     | |                     required by a bound in this function
     | required by this bound in `get`
     = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
@Havunen
Copy link
Contributor Author

Havunen commented Jan 10, 2025

Its actually related to axum: tokio-rs/axum#3169

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

1 participant