]> git.lizzy.rs Git - rust.git/blob - tests/run-make/raw-dylib-inline-cross-dylib/driver.rs
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / run-make / raw-dylib-inline-cross-dylib / driver.rs
1 #![feature(raw_dylib)]
2
3 extern crate raw_dylib_test;
4 extern crate raw_dylib_test_wrapper;
5
6 #[link(name = "extern_2", kind = "raw-dylib")]
7 extern {
8     fn extern_fn_2();
9 }
10
11 fn main() {
12     // NOTE: The inlined call to `extern_fn_2` links against the function in extern_2.dll instead
13     // of extern_1.dll since raw-dylib symbols from the current crate are passed to the linker
14     // first, so any ambiguous names will prefer the current crate's definition.
15     raw_dylib_test::inline_library_function();
16     raw_dylib_test::library_function();
17     raw_dylib_test_wrapper::inline_library_function_calls_inline();
18     unsafe {
19         extern_fn_2();
20     }
21 }