2020-04-14 00:21:19 +02:00
|
|
|
#![feature(ffi_const)]
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
2025-08-09 20:41:01 +02:00
|
|
|
#[unsafe(ffi_const)] //~ ERROR attribute cannot be used on
|
2020-04-14 00:21:19 +02:00
|
|
|
pub fn foo() {}
|
2023-01-24 04:11:00 -08:00
|
|
|
|
2025-08-09 20:41:01 +02:00
|
|
|
#[unsafe(ffi_const)] //~ ERROR attribute cannot be used on
|
2023-01-24 04:11:00 -08:00
|
|
|
macro_rules! bar {
|
2025-04-12 19:58:19 +02:00
|
|
|
() => {};
|
2023-01-24 04:11:00 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
2025-08-09 20:41:01 +02:00
|
|
|
#[unsafe(ffi_const)] //~ ERROR attribute cannot be used on
|
2023-01-24 04:11:00 -08:00
|
|
|
static INT: i32;
|
2025-04-12 19:58:19 +02:00
|
|
|
|
|
|
|
|
#[ffi_const] //~ ERROR unsafe attribute used without unsafe
|
|
|
|
|
fn bar();
|
2023-01-24 04:11:00 -08:00
|
|
|
}
|