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