rust/tests/run-make/separate-link-fail/rmake.rs
2024-06-17 15:59:39 -04:00

16 lines
536 B
Rust

// 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");
}