tweak genmc error report note
This commit is contained in:
parent
2c1f1f0e9b
commit
00bfe9ce6e
10 changed files with 23 additions and 14 deletions
|
|
@ -70,7 +70,7 @@ fn run_genmc_mode_impl<'tcx>(
|
|||
|
||||
// Execute the program until completion to get the return value, or return if an error happens:
|
||||
let Some(return_code) = eval_entry(genmc_ctx.clone()) else {
|
||||
genmc_ctx.print_genmc_output(genmc_config);
|
||||
genmc_ctx.print_genmc_output(genmc_config, tcx);
|
||||
return None;
|
||||
};
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ fn run_genmc_mode_impl<'tcx>(
|
|||
// Since we don't have any span information for the error at this point,
|
||||
// we just print GenMC's error string, and the full GenMC output if requested.
|
||||
eprintln!("(GenMC) Error detected: {error}");
|
||||
genmc_ctx.print_genmc_output(genmc_config);
|
||||
genmc_ctx.print_genmc_output(genmc_config, tcx);
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
|
@ -110,13 +110,13 @@ impl GenmcCtx {
|
|||
///
|
||||
/// This message can be very verbose and is likely not useful for the average user.
|
||||
/// This function should be called *after* Miri has printed all of its output.
|
||||
fn print_genmc_output(&self, genmc_config: &GenmcConfig) {
|
||||
fn print_genmc_output(&self, genmc_config: &GenmcConfig, tcx: TyCtxt<'_>) {
|
||||
if genmc_config.print_genmc_output {
|
||||
eprintln!("GenMC error report:");
|
||||
eprintln!("{}", self.get_result_message());
|
||||
} else {
|
||||
eprintln!(
|
||||
"(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)"
|
||||
tcx.dcx().note(
|
||||
"add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/f
|
|||
LL | f();
|
||||
| ^^^
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/f
|
|||
LL | f();
|
||||
| ^^^
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/f
|
|||
LL | f();
|
||||
| ^^^
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/f
|
|||
LL | f();
|
||||
| ^^^
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ LL | std::process::abort();
|
|||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ LL | std::process::abort();
|
|||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ LL | std::process::abort();
|
|||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ LL | std::process::abort();
|
|||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ LL | std::process::abort();
|
|||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.)
|
||||
note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue