Files
rust/tests/run-make/invalid-staticlib/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
541 B
Rust
Raw Normal View History

2024-06-13 16:19:59 -04:00
// If the static library provided is not valid (in this test,
// created as an empty file),
// rustc should print a normal error message and not throw
// an internal compiler error (ICE).
// See https://github.com/rust-lang/rust/pull/28673
use run_make_support::{fs_wrapper, rustc, static_lib_name};
fn main() {
fs_wrapper::create_file(static_lib_name("foo"));
rustc()
.arg("-")
.crate_type("rlib")
.arg("-lstatic=foo")
.run_fail()
.assert_stderr_contains("failed to add native library");
}