Skip to content

Commit 3d87c02

Browse files
authored
Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkin
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy```` Fixes rust-lang/rust#109486.
2 parents a0d54c7 + 2a5fe25 commit 3d87c02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bin/miri.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,10 @@ fn main() {
286286
// (`install_ice_hook` might change `RUST_BACKTRACE`.)
287287
let env_snapshot = env::vars_os().collect::<Vec<_>>();
288288

289-
// Earliest rustc setup.
290-
rustc_driver::install_ice_hook();
291-
292289
// If the environment asks us to actually be rustc, then do that.
293290
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
291+
// Earliest rustc setup.
292+
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
294293
rustc_driver::init_rustc_env_logger();
295294

296295
let target_crate = if crate_kind == "target" {
@@ -309,6 +308,9 @@ fn main() {
309308
)
310309
}
311310

311+
// Add an ICE bug report hook.
312+
rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());
313+
312314
// Init loggers the Miri way.
313315
init_early_loggers();
314316

0 commit comments

Comments
 (0)