]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/abi/auxiliary/foreign_lib.rs
1 #![crate_name = "foreign_lib"]
2 #![feature(rustc_private)]
7 #[link(name = "rust_test_helpers", kind = "static")]
9 pub fn rust_get_test_int() -> libc
::intptr_t
;
17 pub fn rust_get_test_int() -> libc
::intptr_t
;
22 // Different type, but same ABI (on all supported platforms).
23 // Ensures that we don't ICE or trigger LLVM asserts when
24 // importing the same symbol under different types.
25 // See https://github.com/rust-lang/rust/issues/32740.
27 pub fn rust_get_test_int() -> *const u8;
33 let x
= rustrt
::rust_get_test_int();
34 assert_eq
!(x
, rustrt2
::rust_get_test_int());
35 assert_eq
!(x
as *const _
, rustrt3
::rust_get_test_int());