summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/static-extern-type/use-foo.rs
blob: 932b5b5944bc72d732f530e50fa268986e7400ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(extern_types)]

extern "C" {
    type Foo;
    static FOO: Foo;
    fn bar(foo: *const Foo) -> u8;
}

fn main() {
    unsafe {
        let foo = &FOO;
        assert_eq!(bar(foo), 42);
    }
}