Skip to content

Commit 0c2967c

Browse files
committed
Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors
Cleanup error handlers Mostly by making function naming more consistent. More to do after this, but this is enough for one PR. r? compiler-errors
2 parents 505fe7c + a0bd2c4 commit 0c2967c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: src/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ pub fn report_error<'tcx, 'mir>(
384384

385385
// Include a note like `std` does when we omit frames from a backtrace
386386
if was_pruned {
387-
ecx.tcx.sess.diagnostic().note_without_error(
387+
ecx.tcx.sess.diagnostic().note(
388388
"some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace",
389389
);
390390
}
@@ -431,7 +431,7 @@ pub fn report_leaks<'mir, 'tcx>(
431431
);
432432
}
433433
if any_pruned {
434-
ecx.tcx.sess.diagnostic().note_without_error(
434+
ecx.tcx.sess.diagnostic().note(
435435
"some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace",
436436
);
437437
}
@@ -456,7 +456,7 @@ pub fn report_msg<'tcx>(
456456
let mut err = match diag_level {
457457
DiagLevel::Error => sess.struct_span_err(span, title).forget_guarantee(),
458458
DiagLevel::Warning => sess.struct_span_warn(span, title),
459-
DiagLevel::Note => sess.diagnostic().span_note_diag(span, title),
459+
DiagLevel::Note => sess.diagnostic().struct_span_note(span, title),
460460
};
461461

462462
// Show main message.

Diff for: src/eval.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ pub fn eval_entry<'tcx>(
464464
// Check for thread leaks.
465465
if !ecx.have_all_terminated() {
466466
tcx.sess.err("the main thread terminated without waiting for all remaining threads");
467-
tcx.sess.note_without_error("pass `-Zmiri-ignore-leaks` to disable this check");
467+
tcx.sess.note("pass `-Zmiri-ignore-leaks` to disable this check");
468468
return None;
469469
}
470470
// Check for memory leaks.
@@ -475,7 +475,7 @@ pub fn eval_entry<'tcx>(
475475
let leak_message = "the evaluated program leaked memory, pass `-Zmiri-ignore-leaks` to disable this check";
476476
if ecx.machine.collect_leak_backtraces {
477477
// If we are collecting leak backtraces, each leak is a distinct error diagnostic.
478-
tcx.sess.note_without_error(leak_message);
478+
tcx.sess.note(leak_message);
479479
} else {
480480
// If we do not have backtraces, we just report an error without any span.
481481
tcx.sess.err(leak_message);

0 commit comments

Comments
 (0)