// Add filename to `miri` arguments.
config.args.insert(0, compiler.input().filestem().to_string());
- if let Some(return_code) = miri::eval_main(tcx, entry_def_id, config) {
+ if let Some(return_code) = miri::eval_main(tcx, entry_def_id.to_def_id(), config) {
std::process::exit(
i32::try_from(return_code).expect("Return value was too large!"),
);
})
.and_then(|result| result);
let exit_code = match result {
- Ok(_) => rustc_driver::EXIT_SUCCESS,
+ Ok(()) => rustc_driver::EXIT_SUCCESS,
Err(_) => rustc_driver::EXIT_FAILURE,
};
std::process::exit(exit_code);