diff --git a/src/eval.rs b/src/eval.rs index 9531a2d78aba..e559dfedf933 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -302,7 +302,10 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) -> if !ignore_leaks { // Check for thread leaks. if !ecx.have_all_terminated() { - tcx.sess.err("the main thread terminated without waiting for all remaining threads"); + tcx.sess.err( + "the main thread terminated without waiting for all remaining threads", + ); + tcx.sess.note_without_error("pass `-Zmiri-ignore-leaks` to disable this check"); return None; } // Check for memory leaks. @@ -310,6 +313,7 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) -> let leaks = ecx.memory.leak_report(&ecx.machine.static_roots); if leaks != 0 { tcx.sess.err("the evaluated program leaked memory"); + tcx.sess.note_without_error("pass `-Zmiri-ignore-leaks` to disable this check"); // Ignore the provided return code - let the reported error // determine the return code. return None;