mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
19 lines
396 B
Rust
19 lines
396 B
Rust
#![feature(ffi_const)]
|
|
#![crate_type = "lib"]
|
|
|
|
#[unsafe(ffi_const)] //~ ERROR attribute cannot be used on
|
|
pub fn foo() {}
|
|
|
|
#[unsafe(ffi_const)] //~ ERROR attribute cannot be used on
|
|
macro_rules! bar {
|
|
() => {};
|
|
}
|
|
|
|
extern "C" {
|
|
#[unsafe(ffi_const)] //~ ERROR attribute cannot be used on
|
|
static INT: i32;
|
|
|
|
#[ffi_const] //~ ERROR unsafe attribute used without unsafe
|
|
fn bar();
|
|
}
|