-
Notifications
You must be signed in to change notification settings - Fork 373
Parse unsafe in attributes #1013
Copy link
Copy link
Closed
Description
Now attributes can contain unsafe, but cbindgen gives the following error:
ParseSyntaxError { crate_name: "...", src_path: "...", error: Error("expected identifier, found keyword `unsafe`") }I think this issue could be urgent (should be done before edition 2024), because programmers, like me, may write:
#[unsafe(export_name = "xxx")]
pub fn f() {
}Current rust stable (1.82.x) introduces this syntax and recommends us to add unsafe, while the old form (without unsafe) is still acceptable. But the old form will be a hard error in edition 2024.
This issue seems actually from upstream: dtolnay/syn#1710
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels