rust/tests/run-make/metadata-only-crate-no-ice/rmake.rs

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

15 lines
659 B
Rust
Raw Normal View History

// In a dependency hierarchy, metadata-only crates could cause an Internal
// Compiler Error (ICE) due to a compiler bug - not correctly fetching sources for
// metadata-only crates. This test is a minimal reproduction of a program that triggered
// this bug, and checks that no ICE occurs.
// See https://github.com/rust-lang/rust/issues/40535
use run_make_support::rustc;
fn main() {
rustc().input("baz.rs").emit("metadata").run();
rustc().input("bar.rs").emit("metadata").extern_("baz", "libbaz.rmeta").run();
2024-06-19 14:46:27 -05:00
// There should be no internal compiler error.
rustc().input("foo.rs").emit("metadata").extern_("bar", "libbaz.rmeta").run();
}