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

tower 5.0 : error[E0015]: cannot call non-const fn Identity::new in constant functions #786

Open
LeonGGX opened this issue Aug 14, 2024 · 2 comments

Comments

@LeonGGX
Copy link

LeonGGX commented Aug 14, 2024

Switching from tower 0.4 to tower 0.5.0 in an application using axum, couldn't compile tower lib due to the following error :
Compiling tower v0.5.0
error[E0015]: cannot call non-const fn Identity::new in constant functions
--> C:...\tower-0.5.0\src\builder\mod.rs:120:20
|
120 | layer: Identity::new(),
| ^^^^^^^^^^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants

System : Windows 11
Rust : latest stable version.

@seanmonstar
Copy link
Collaborator

See #784.

@snaeil
Copy link

snaeil commented Sep 4, 2024

The problem remained for me until I deleted the target directory and Cargo.lock.

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

3 participants