Skip to content

Commit 750d82d

Browse files
committed
Auto merge of #3238 - rust-lang:rustup-2023-12-24, r=saethlin
Automatic Rustup
2 parents fcd54c5 + 15dee66 commit 750d82d

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
767453eb7ca188e991ac5568c17b984dd4893e77
1+
3166bbef9248fce2695899e21203f42a21046551

src/diagnostics.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::num::NonZeroU64;
33

44
use log::trace;
55

6-
use rustc_errors::DiagnosticMessage;
6+
use rustc_errors::{DiagnosticBuilder, DiagnosticMessage, Level};
77
use rustc_span::{SpanData, Symbol, DUMMY_SP};
88
use rustc_target::abi::{Align, Size};
99

@@ -453,11 +453,13 @@ pub fn report_msg<'tcx>(
453453
) {
454454
let span = stacktrace.first().map_or(DUMMY_SP, |fi| fi.span);
455455
let sess = machine.tcx.sess;
456-
let mut err = match diag_level {
457-
DiagLevel::Error => sess.struct_span_err(span, title).forget_guarantee(),
458-
DiagLevel::Warning => sess.struct_span_warn(span, title),
459-
DiagLevel::Note => sess.dcx().struct_span_note(span, title),
456+
let level = match diag_level {
457+
DiagLevel::Error => Level::Error { lint: false },
458+
DiagLevel::Warning => Level::Warning(None),
459+
DiagLevel::Note => Level::Note,
460460
};
461+
let mut err = DiagnosticBuilder::<()>::new(sess.dcx(), level, title);
462+
err.set_span(span);
461463

462464
// Show main message.
463465
if span != DUMMY_SP {

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![feature(round_ties_even)]
1212
#![feature(let_chains)]
1313
#![feature(lint_reasons)]
14-
#![cfg_attr(bootstrap, feature(trait_upcasting))]
1514
// Configure clippy and other lints
1615
#![allow(
1716
clippy::collapsible_else_if,

0 commit comments

Comments
 (0)