Skip to content

Commit 0ca6e44

Browse files
committed
Auto merge of #3264 - rust-lang:rustup-2024-01-11, r=saethlin
Automatic Rustup
2 parents dae1999 + 50f1e38 commit 0ca6e44

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
94807670a6a3834cc9b71b0b803d49d307c9ba5d
1+
65b323b168daa6c723a8a5b4ddf939f3b12e0329

src/diagnostics.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ pub fn report_msg<'tcx>(
455455
let sess = machine.tcx.sess;
456456
let level = match diag_level {
457457
DiagLevel::Error => Level::Error,
458-
DiagLevel::Warning => Level::Warning(None),
458+
DiagLevel::Warning => Level::Warning,
459459
DiagLevel::Note => Level::Note,
460460
};
461461
let mut err = DiagnosticBuilder::<()>::new(sess.dcx(), level, title);
@@ -499,22 +499,20 @@ pub fn report_msg<'tcx>(
499499
err.note(if extra_span { "BACKTRACE (of the first span):" } else { "BACKTRACE:" });
500500
}
501501

502-
let (mut err, handler) = err.into_diagnostic().unwrap();
503-
504502
// Add backtrace
505503
for (idx, frame_info) in stacktrace.iter().enumerate() {
506504
let is_local = machine.is_local(frame_info);
507505
// No span for non-local frames and the first frame (which is the error site).
508506
if is_local && idx > 0 {
509-
err.eager_subdiagnostic(handler, frame_info.as_note(machine.tcx));
507+
err.eager_subdiagnostic(err.dcx, frame_info.as_note(machine.tcx));
510508
} else {
511509
let sm = sess.source_map();
512510
let span = sm.span_to_embeddable_string(frame_info.span);
513511
err.note(format!("{frame_info} at {span}"));
514512
}
515513
}
516514

517-
handler.emit_diagnostic(err);
515+
err.emit();
518516
}
519517

520518
impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {

0 commit comments

Comments
 (0)