summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs
blob: ae9207864a2aea0c8a55832dfda7acf22573aafd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// only-windows
// only-x86
#![feature(raw_dylib)]

#[link(name = "foo", import_name_type = "decorated")]
//~^ ERROR import name type can only be used with link kind `raw-dylib`
extern "C" { }

#[link(name = "bar", kind = "static", import_name_type = "decorated")]
//~^ ERROR import name type can only be used with link kind `raw-dylib`
extern "C" { }

// Specifying `import_name_type` before `kind` shouldn't raise an error.
#[link(name = "bar", import_name_type = "decorated", kind = "raw-dylib")]
extern "C" { }

fn main() {}