dtolnay / syn

Parser for Rust source code
Apache License 2.0
2.79k stars 306 forks source link

Parse `safe` items in extern blocks #1675

Open dtolnay opened 2 months ago

dtolnay commented 2 months ago

Tracking issue: https://github.com/rust-lang/rust/issues/123743 RFC: https://github.com/rust-lang/rfcs/pull/3484

unsafe extern "C" {
    safe static TEST1: i32;
    safe fn test1(i: i32);
}

https://github.com/rust-lang/rust/blob/76e7a0849c07d73e4d9afde8036ee8c450127cc8/tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs