]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2627-raw-dylib/multiple-declarations.rs
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / rfc-2627-raw-dylib / multiple-declarations.rs
1 // only-x86
2 // only-windows
3 // compile-flags: --crate-type lib --emit link
4 #![allow(clashing_extern_declarations)]
5 #![feature(raw_dylib)]
6 //~^ WARN the feature `raw_dylib` is incomplete
7 #[link(name = "foo", kind = "raw-dylib")]
8 extern "C" {
9     fn f(x: i32);
10 }
11
12 pub fn lib_main() {
13     #[link(name = "foo", kind = "raw-dylib")]
14     extern "stdcall" {
15         fn f(x: i32);
16         //~^ ERROR multiple declarations of external function `f` from library `foo.dll` have different calling conventions
17     }
18
19     unsafe { f(42); }
20 }