rewrite and rename issue-40535 to rmake
This commit is contained in:
parent
651f02363d
commit
5e23dfea9d
@ -63,7 +63,6 @@ run-make/issue-33329/Makefile
|
||||
run-make/issue-35164/Makefile
|
||||
run-make/issue-36710/Makefile
|
||||
run-make/issue-37839/Makefile
|
||||
run-make/issue-40535/Makefile
|
||||
run-make/issue-47551/Makefile
|
||||
run-make/issue-69368/Makefile
|
||||
run-make/issue-83045/Makefile
|
||||
|
@ -1,13 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
# The ICE occurred in the following situation:
|
||||
# * `foo` declares `extern crate bar, baz`, depends only on `bar` (forgetting `baz` in `Cargo.toml`)
|
||||
# * `bar` declares and depends on `extern crate baz`
|
||||
# * All crates built in metadata-only mode (`cargo check`)
|
||||
all:
|
||||
# cc https://github.com/rust-lang/rust/issues/40623
|
||||
$(RUSTC) baz.rs --emit=metadata
|
||||
$(RUSTC) bar.rs --emit=metadata --extern baz=$(TMPDIR)/libbaz.rmeta
|
||||
$(RUSTC) foo.rs --emit=metadata --extern bar=$(TMPDIR)/libbar.rmeta 2>&1 | \
|
||||
$(CGREP) -v "unexpectedly panicked"
|
||||
# ^ Succeeds if it doesn't find the ICE message
|
14
tests/run-make/metadata-only-crate-no-ice/rmake.rs
Normal file
14
tests/run-make/metadata-only-crate-no-ice/rmake.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// 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();
|
||||
// There should be no internal compiler error message.
|
||||
rustc().input("foo.rs").emit("metadata").extern_("bar", "libbaz.rmeta").run().assert_stderr_not_contains("unexpectedly panicked");
|
||||
}
|
Loading…
Reference in New Issue
Block a user