Skip to content

Use proc_macro::is_available() on rust 1.57+ #300

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

bjorn3
Copy link
Contributor

@bjorn3 bjorn3 commented Oct 11, 2021

This avoids the need for catching a panic, which is incompatible with projects using panic=abort or cg_clif.

proc_macro::is_available() has been stabilized in rust-lang/rust#89735, which landed yesterday.

This avoids the need for catching a panic, which is incompatible with
projects using panic=abort or cg_clif.
Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit 321a711 into dtolnay:master Oct 12, 2021
@bjorn3 bjorn3 deleted the proc_macro_is_available branch October 12, 2021 18:32
bjorn3 added a commit to bjorn3/proc-macro2 that referenced this pull request Dec 2, 2021
In dtolnay#300 I made a mistake with the #[cfg] causing
proc_macro::is_available() to never actually be used. I have now
double checked that it is actually used on Rust 1.57+.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants