rust/tests/ui/feature-gates/feature-gate-ffi_pure.rs
Folkert de Vries f472cc8cd4
error on unsafe attributes in pre-2024 editions
the `no_mangle`, `link_section` and `export_name` attributes are exceptions, and can still be used without an unsafe in earlier editions
2025-04-13 01:22:59 +02:00

7 lines
146 B
Rust

#![crate_type = "lib"]
extern "C" {
#[unsafe(ffi_pure)] //~ ERROR the `#[ffi_pure]` attribute is an experimental feature
pub fn foo();
}