rust/tests/ui/ffi-attrs/ffi_pure.rs
Jonathan Brouwer 4bb7bf64e0
Update uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-14 18:18:42 +02:00

18 lines
391 B
Rust

#![feature(ffi_pure)]
#![crate_type = "lib"]
#[unsafe(ffi_pure)] //~ ERROR attribute cannot be used on
pub fn foo() {}
#[unsafe(ffi_pure)] //~ ERROR attribute cannot be used on
macro_rules! bar {
() => {};
}
extern "C" {
#[unsafe(ffi_pure)] //~ ERROR attribute cannot be used on
static INT: i32;
#[ffi_pure] //~ ERROR unsafe attribute used without unsafe
fn bar();
}