Debian Codegraph @

vendored-meson/meson/test cases/rust/22 cargo subproject/subprojects/foo-0-rs/lib.rs

raw
1 extern crate common;
2 extern crate libothername;
3
4 extern "C" {
5 fn extra_func() -> i32;
6 }
7
8 #[cfg(feature = "foo")]
9 #[no_mangle]
10 pub extern "C" fn rust_func() -> i32 {
11 #[cfg(unix)]
12 {
13 extern crate unixdep;
14 assert!(unixdep::only_on_unix() == 0);
15 }
16 assert!(common::common_func() == 0);
17 assert!(libothername::stuff() == 42);
18 let v: i32;
19 unsafe {
20 v = extra_func();
21 };
22 mybar::VALUE + v
23 }