about summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs
blob: 057242246f0ed1803a6cfe38a9b2305f9ee0f519 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Tests that failing to run dlltool will raise an error.

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

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