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

Enable diagnostic attributes for Rust 1.78+ #2693

Merged
merged 1 commit into from
Apr 30, 2024
Merged

Conversation

jplatte
Copy link
Member

@jplatte jplatte commented Mar 31, 2024

Stabilized for 1.78 in rust-lang/rust#119888.

@tisonkun does this fix your issue? You can try it by adding

[patch.crates-io]
axum = { git = "https://github.com/tokio-rs/axum", branch = "jplatte/diagnostic-ver" }
axum-core = { git = "https://github.com/tokio-rs/axum", branch = "jplatte/diagnostic-ver" }

to your top-level Cargo.toml (the workspace file if you use a Cargo workspace).

@jplatte jplatte requested a review from davidpdrsn March 31, 2024 18:09
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

With this patch, it compiles; otherwise, it can't.

Thank you!

@seanmonstar
Copy link
Member

Does adding this new proc macro slow down compilation?

@jplatte
Copy link
Member Author

jplatte commented Apr 30, 2024

We were already using rustversion, just in a build script. By using it in the crate directly and deleting the build script, I would expect things to become slightly faster since every build script has cargo spawn a separate compiler process, then the build script process.

@seanmonstar seanmonstar merged commit 5201798 into main Apr 30, 2024
18 checks passed
@seanmonstar seanmonstar deleted the jplatte/diagnostic-ver branch April 30, 2024 15:05
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

Successfully merging this pull request may close these issues.

4 participants