From 0708b289b72fc3328c0244be6c1b267bba18fabd Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 18 Aug 2024 13:36:11 +0200 Subject: [PATCH] fix build with bootstrap compiler --- src/tools/miri/src/eval.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/miri/src/eval.rs b/src/tools/miri/src/eval.rs index 0850a8f24d9..bb623c66892 100644 --- a/src/tools/miri/src/eval.rs +++ b/src/tools/miri/src/eval.rs @@ -458,7 +458,14 @@ pub fn eval_entry<'tcx>( panic::resume_unwind(panic_payload) }); // `Ok` can never happen. + #[cfg(not(bootstrap))] let Err(res) = res; + #[cfg(bootstrap)] + let res = match res { + Err(res) => res, + // `Ok` can never happen + Ok(never) => match never {}, + }; // Machine cleanup. Only do this if all threads have terminated; threads that are still running // might cause Stacked Borrows errors (https://github.com/rust-lang/miri/issues/2396).