about summary refs log tree commit diff
path: root/tests/run-make/separate-link-fail/rmake.rs
blob: b5d5300de68f7ba04c148a1a552a96e125768975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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");
}