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

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

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

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