fix build with bootstrap compiler

This commit is contained in:
Ralf Jung 2024-08-18 13:36:11 +02:00
parent c74ffd88cb
commit 0708b289b7

View File

@ -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).