Skip to content

Commit

Permalink
rewrite separate-link-fail to rmake.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 17, 2024
1 parent 10db8c7 commit dfba1b5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ run-make/rustdoc-io-error/Makefile
run-make/sanitizer-cdylib-link/Makefile
run-make/sanitizer-dylib-link/Makefile
run-make/sanitizer-staticlib-link/Makefile
run-make/separate-link-fail/Makefile
run-make/sepcomp-cci-copies/Makefile
run-make/sepcomp-inlining/Makefile
run-make/sepcomp-separate/Makefile
Expand Down
7 changes: 0 additions & 7 deletions tests/run-make/separate-link-fail/Makefile

This file was deleted.

1 change: 1 addition & 0 deletions tests/run-make/separate-link-fail/foo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() {}
15 changes: 15 additions & 0 deletions tests/run-make/separate-link-fail/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// rustc usually wants Rust code as its input. The flag `link-only` is one
// exception, where a .rlink file is instead requested. The compiler should
// fail when the user is wrongly passing the original Rust code
// instead of the generated .rlink file when this flag is on.
// https://github.com/rust-lang/rust/issues/95297

use run_make_support::rustc;

fn main() {
rustc()
.arg("-Zlink-only")
.input("foo.rs")
.run_fail()
.assert_stderr_contains("The input does not look like a .rlink file");
}

0 comments on commit dfba1b5

Please sign in to comment.