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

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

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.
src/detection.rs Outdated Show resolved Hide resolved
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+.
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.

None yet

2 participants