diff options
| author | bors <bors@rust-lang.org> | 2016-12-06 10:54:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-06 10:54:45 +0000 |
| commit | 1692c0b587e1d91bb96a99f9f2588d7d2b247e3f (patch) | |
| tree | 97531974dddac60a84b7e0576382abfe9c07e6c1 /src/test/compile-fail | |
| parent | ff261d3a6b5964e1e3744d055238de624afc5d76 (diff) | |
| parent | 7d05d1e7f0add9e5151d48d51d92b6fb5885e257 (diff) | |
| download | rust-1692c0b587e1d91bb96a99f9f2588d7d2b247e3f.tar.gz rust-1692c0b587e1d91bb96a99f9f2588d7d2b247e3f.zip | |
Auto merge of #37973 - vadimcn:dllimport, r=alexcrichton
Implement RFC 1717 Implement the first two points from #37403. r? @alexcrichton
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/rfc1717/missing-link-attr.rs (renamed from src/test/compile-fail/feature-gate-linked-from.rs) | 10 | ||||
| -rw-r--r-- | src/test/compile-fail/rfc1717/multiple-renames.rs | 17 | ||||
| -rw-r--r-- | src/test/compile-fail/rfc1717/rename-to-empty.rs | 17 |
3 files changed, 38 insertions, 6 deletions
diff --git a/src/test/compile-fail/feature-gate-linked-from.rs b/src/test/compile-fail/rfc1717/missing-link-attr.rs index 8705684111e..810efdedfd6 100644 --- a/src/test/compile-fail/feature-gate-linked-from.rs +++ b/src/test/compile-fail/rfc1717/missing-link-attr.rs @@ -1,4 +1,4 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -8,9 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[linked_from = "foo"] //~ ERROR experimental feature -extern { - fn foo(); -} +// compile-flags: -l foo:bar +// error-pattern: renaming of the library `foo` was specified -fn main() {} +#![crate_type = "lib"] diff --git a/src/test/compile-fail/rfc1717/multiple-renames.rs b/src/test/compile-fail/rfc1717/multiple-renames.rs new file mode 100644 index 00000000000..e75c1a14b24 --- /dev/null +++ b/src/test/compile-fail/rfc1717/multiple-renames.rs @@ -0,0 +1,17 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: -l foo:bar -l foo:baz +// error-pattern: multiple renamings were specified for library + +#![crate_type = "lib"] + +#[link(name = "foo")] +extern "C" {} diff --git a/src/test/compile-fail/rfc1717/rename-to-empty.rs b/src/test/compile-fail/rfc1717/rename-to-empty.rs new file mode 100644 index 00000000000..ab8c238bc27 --- /dev/null +++ b/src/test/compile-fail/rfc1717/rename-to-empty.rs @@ -0,0 +1,17 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: -l foo: +// error-pattern: an empty renaming target was specified for library + +#![crate_type = "lib"] + +#[link(name = "foo")] +extern "C" {} |
