2025-09-22 17:32:50 +08:00
|
|
|
// Running --merge=finalize without an input crate root should not trigger ICE.
|
|
|
|
|
// Issue: https://github.com/rust-lang/rust/issues/146646
|
|
|
|
|
|
|
|
|
|
//@ needs-target-std
|
|
|
|
|
|
2025-09-22 18:09:10 +08:00
|
|
|
use run_make_support::{path, rustdoc};
|
2025-09-22 17:32:50 +08:00
|
|
|
|
|
|
|
|
fn main() {
|
2025-09-22 18:09:10 +08:00
|
|
|
let out_dir = path("out");
|
|
|
|
|
let merged_dir = path("merged");
|
|
|
|
|
let parts_out_dir = path("parts");
|
2025-09-22 17:32:50 +08:00
|
|
|
rustdoc()
|
|
|
|
|
.input("sierra.rs")
|
2025-09-22 18:09:10 +08:00
|
|
|
.out_dir(&out_dir)
|
2025-09-22 17:32:50 +08:00
|
|
|
.arg("-Zunstable-options")
|
2025-09-22 18:09:10 +08:00
|
|
|
.arg(format!("--parts-out-dir={}", parts_out_dir.display()))
|
2025-09-22 17:32:50 +08:00
|
|
|
.arg("--merge=none")
|
|
|
|
|
.run();
|
2025-09-22 20:36:18 +08:00
|
|
|
assert!(parts_out_dir.join("crate-info").exists());
|
2025-09-22 17:32:50 +08:00
|
|
|
|
2025-09-22 18:09:10 +08:00
|
|
|
let output = rustdoc()
|
2025-09-22 17:32:50 +08:00
|
|
|
.arg("-Zunstable-options")
|
2025-09-22 18:09:10 +08:00
|
|
|
.out_dir(&out_dir)
|
|
|
|
|
.arg(format!("--include-parts-dir={}", parts_out_dir.display()))
|
2025-09-22 17:32:50 +08:00
|
|
|
.arg("--merge=finalize")
|
|
|
|
|
.run();
|
2025-09-22 20:36:18 +08:00
|
|
|
output.assert_stderr_not_contains("error: the compiler unexpectedly panicked. this is a bug.");
|
2025-09-22 17:32:50 +08:00
|
|
|
}
|