diff options
| author | kennytm <kennytm@gmail.com> | 2019-01-05 23:56:46 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-05 23:56:46 +0800 |
| commit | 3d8e5d40c5cd63b59ab12cf96bae40fdaa03927a (patch) | |
| tree | e2b169be162ecabe8500d0a39aa6fbebc6eaed1e | |
| parent | 6c58b842d61992a470a726bbc3abfdc540c2c6af (diff) | |
| parent | 794b81ea5eb11db59e1337e3a09b2b2b2480c1bd (diff) | |
| download | rust-3d8e5d40c5cd63b59ab12cf96bae40fdaa03927a.tar.gz rust-3d8e5d40c5cd63b59ab12cf96bae40fdaa03927a.zip | |
Rollup merge of #57233 - Smibu:rename-and-fix-nolink-test, r=alexcrichton
Rename and fix nolink-with-link-args test There are three problems with the nolink-with-link-args test: * The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in #46291. * In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](https://github.com/rust-lang/rust/pull/12826). * Pattern has a small typo. At first I was going to completely remove this test, but there is [a closed pull request for that](https://github.com/rust-lang/rust/pull/21090). So: * rename the file as suggested in the closed PR * adjust the comment * fix typo in the pattern * add `ignore-msvc`. r? @alexcrichton
| -rw-r--r-- | src/test/compile-fail/invalid-link-args.rs | 12 | ||||
| -rw-r--r-- | src/test/compile-fail/nolink-with-link-args.rs | 13 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/test/compile-fail/invalid-link-args.rs b/src/test/compile-fail/invalid-link-args.rs new file mode 100644 index 00000000000..1e68b4f8b70 --- /dev/null +++ b/src/test/compile-fail/invalid-link-args.rs @@ -0,0 +1,12 @@ +// ignore-msvc due to linker-flavor=ld +// error-pattern:aFdEfSeVEEE +// compile-flags: -C linker-flavor=ld + +/* Make sure invalid link_args are printed to stderr. */ + +#![feature(link_args)] + +#[link_args = "aFdEfSeVEEE"] +extern {} + +fn main() { } diff --git a/src/test/compile-fail/nolink-with-link-args.rs b/src/test/compile-fail/nolink-with-link-args.rs deleted file mode 100644 index c2ca2f80742..00000000000 --- a/src/test/compile-fail/nolink-with-link-args.rs +++ /dev/null @@ -1,13 +0,0 @@ -// error-pattern:aFdEfSeVEE -// compile-flags: -C linker-flavor=ld - -/* We're testing that link_args are indeed passed when nolink is specified. -So we try to compile with junk link_args and make sure they are visible in -the compiler output. */ - -#![feature(link_args)] - -#[link_args = "aFdEfSeVEEE"] -extern {} - -fn main() { } |
