summaryrefslogtreecommitdiffstats
path: root/tests/ui/ffi_const.rs
blob: aa20a4d4c653a871d276fdf45ed00f7fae764ccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![feature(ffi_const)]
#![crate_type = "lib"]

#[ffi_const] //~ ERROR `#[ffi_const]` may only be used on foreign functions
pub fn foo() {}

#[ffi_const] //~ ERROR `#[ffi_const]` may only be used on foreign functions
macro_rules! bar {
    () => ()
}

extern "C" {
    #[ffi_const] //~ ERROR `#[ffi_const]` may only be used on foreign functions
    static INT: i32;
}