summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs
blob: a07be9d92b4ed97674f41b88ba23b0a7cb16f1f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Tests that failing to run dlltool will raise an error.

// only-gnu
// only-windows
// compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exit.exe
#[link(name = "foo", kind = "raw-dylib")]
extern "C" {
    fn f(x: i32);
}

pub fn lib_main() {
    unsafe { f(42); }
}