-
Notifications
You must be signed in to change notification settings - Fork 326
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
Parse unsafe
in attributes
#1013
Comments
Because dtolnay/syn#1710 is done, all we need is to wait for the next release of |
Not yet completed, I think. The current cbindgen itself does not know unsafe attributes. cbindgen/src/bindgen/utilities.rs Lines 196 to 198 in 3ed9434
They are now parsed indeed, but just skipped. |
Yes, you are right. cbindgen should visit the inner of the |
See https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#unsafe-attributes
Now attributes can contain
unsafe
, but cbindgen gives the following error:I think this issue could be urgent (should be done before edition 2024), because programmers, like me, may write:
Current rust stable (1.82.x) introduces this syntax and recommends us to add
unsafe
, while the old form (withoutunsafe
) is still acceptable. But the old form will be a hard error in edition 2024.This issue seems actually from upstream: dtolnay/syn#1710
The text was updated successfully, but these errors were encountered: