Skip to content

Commit

Permalink
Auto merge of #3238 - rust-lang:rustup-2023-12-24, r=saethlin
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
bors committed Dec 24, 2023
2 parents fcd54c5 + 15dee66 commit 750d82d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
767453eb7ca188e991ac5568c17b984dd4893e77
3166bbef9248fce2695899e21203f42a21046551
12 changes: 7 additions & 5 deletions src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::num::NonZeroU64;

use log::trace;

use rustc_errors::DiagnosticMessage;
use rustc_errors::{DiagnosticBuilder, DiagnosticMessage, Level};
use rustc_span::{SpanData, Symbol, DUMMY_SP};
use rustc_target::abi::{Align, Size};

Expand Down Expand Up @@ -453,11 +453,13 @@ pub fn report_msg<'tcx>(
) {
let span = stacktrace.first().map_or(DUMMY_SP, |fi| fi.span);
let sess = machine.tcx.sess;
let mut err = match diag_level {
DiagLevel::Error => sess.struct_span_err(span, title).forget_guarantee(),
DiagLevel::Warning => sess.struct_span_warn(span, title),
DiagLevel::Note => sess.dcx().struct_span_note(span, title),
let level = match diag_level {
DiagLevel::Error => Level::Error { lint: false },
DiagLevel::Warning => Level::Warning(None),
DiagLevel::Note => Level::Note,
};
let mut err = DiagnosticBuilder::<()>::new(sess.dcx(), level, title);
err.set_span(span);

// Show main message.
if span != DUMMY_SP {
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#![feature(round_ties_even)]
#![feature(let_chains)]
#![feature(lint_reasons)]
#![cfg_attr(bootstrap, feature(trait_upcasting))]
// Configure clippy and other lints
#![allow(
clippy::collapsible_else_if,
Expand Down

0 comments on commit 750d82d

Please sign in to comment.