]> git.lizzy.rs Git - rust.git/blob - src/test/ui/abi/foreign/foreign-dupe.rs
Merge commit 'a8385522ade6f67853edac730b5bf164ddb298fd' into simd-remove-autosplats
[rust.git] / src / test / ui / abi / foreign / foreign-dupe.rs
1 // run-pass
2 // aux-build:foreign_lib.rs
3 // ignore-wasm32-bare no libc to test ffi with
4
5 // Check that we can still call duplicated extern (imported) functions
6 // which were declared in another crate. See issues #32740 and #32783.
7
8
9 extern crate foreign_lib;
10
11 pub fn main() {
12     unsafe {
13         let x = foreign_lib::rustrt::rust_get_test_int();
14         assert_eq!(x, foreign_lib::rustrt2::rust_get_test_int());
15         assert_eq!(x as *const _, foreign_lib::rustrt3::rust_get_test_int());
16     }
17 }