]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/static-extern-type/use-foo.rs
Rollup merge of #107242 - notriddle:notriddle/title-ordering, r=GuillaumeGomez
[rust.git] / tests / run-make-fulldeps / static-extern-type / use-foo.rs
1 #![feature(extern_types)]
2
3 extern "C" {
4     type Foo;
5     static FOO: Foo;
6     fn bar(foo: *const Foo) -> u8;
7 }
8
9 fn main() {
10     unsafe {
11         let foo = &FOO;
12         assert_eq!(bar(foo), 42);
13     }
14 }