Skip to content

Commit

Permalink
Rollup merge of #119538 - nnethercote:cleanup-errors-5, r=compiler-er…
Browse files Browse the repository at this point in the history
…rors

Cleanup error handlers: round 5

More rustc_errors cleanups. A sequel to rust-lang/rust#119171.

r? ````@compiler-errors````
  • Loading branch information
compiler-errors authored Jan 5, 2024
2 parents df157bd + 9e19369 commit 1e041e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,12 @@ pub fn report_msg<'tcx>(
let span = stacktrace.first().map_or(DUMMY_SP, |fi| fi.span);
let sess = machine.tcx.sess;
let level = match diag_level {
DiagLevel::Error => Level::Error { lint: false },
DiagLevel::Error => Level::Error,
DiagLevel::Warning => Level::Warning(None),
DiagLevel::Note => Level::Note,
};
let mut err = DiagnosticBuilder::<()>::new(sess.dcx(), level, title);
err.set_span(span);
err.span(span);

// Show main message.
if span != DUMMY_SP {
Expand Down

0 comments on commit 1e041e9

Please sign in to comment.