Skip to content

Commit 312f174

Browse files
committed
Auto merge of #3254 - rust-lang:rustup-2024-01-06, r=saethlin
Automatic Rustup
2 parents 8c0da96 + ec2f768 commit 312f174

23 files changed

+35
-26
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a59a98024e3fe317e37e218392f5c34e932b2394
1+
5bcd86d89b2b7b6a490f7e075dd4eb346deb5f98

src/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,12 @@ pub fn report_msg<'tcx>(
454454
let span = stacktrace.first().map_or(DUMMY_SP, |fi| fi.span);
455455
let sess = machine.tcx.sess;
456456
let level = match diag_level {
457-
DiagLevel::Error => Level::Error { lint: false },
457+
DiagLevel::Error => Level::Error,
458458
DiagLevel::Warning => Level::Warning(None),
459459
DiagLevel::Note => Level::Note,
460460
};
461461
let mut err = DiagnosticBuilder::<()>::new(sess.dcx(), level, title);
462-
err.set_span(span);
462+
err.span(span);
463463

464464
// Show main message.
465465
if span != DUMMY_SP {

tests/fail/both_borrows/newtype_pair_retagging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//@[stack]error-in-other-file: which is strongly protected
55
//@[tree]error-in-other-file: /deallocation through .* is forbidden/
6-
struct Newtype<'a>(&'a mut i32, i32);
6+
struct Newtype<'a>(#[allow(dead_code)] &'a mut i32, #[allow(dead_code)] i32);
77

88
fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
99
dealloc();

tests/fail/both_borrows/newtype_retagging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//@[stack]error-in-other-file: which is strongly protected
55
//@[tree]error-in-other-file: /deallocation through .* is forbidden/
66

7-
struct Newtype<'a>(&'a mut i32);
7+
struct Newtype<'a>(#[allow(dead_code)] &'a mut i32);
88

99
fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
1010
dealloc();

tests/fail/concurrency/read_only_atomic_load_large.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use std::sync::atomic::{AtomicI64, Ordering};
77

88
#[repr(align(8))]
9-
struct AlignedI64(i64);
9+
struct AlignedI64(#[allow(dead_code)] i64);
1010

1111
fn main() {
1212
static X: AlignedI64 = AlignedI64(0);

tests/fail/dangling_pointers/dyn_size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// should find the bug even without retagging
22
//@compile-flags: -Zmiri-disable-stacked-borrows
33

4-
struct SliceWithHead(u8, [u8]);
4+
struct SliceWithHead(#[allow(dead_code)] u8, #[allow(dead_code)] [u8]);
55

66
fn main() {
77
let buf = [0u32; 1];

tests/fail/function_pointers/abi_mismatch_array_vs_struct.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
// Some targets treat arrays and structs very differently. We would probably catch that on those
44
// targets since we check the `PassMode`; here we ensure that we catch it on *all* targets
55
// (in particular, on x86-64 the pass mode is `Indirect` for both of these).
6-
struct S(i32, i32, i32, i32);
6+
struct S(
7+
#[allow(dead_code)] i32,
8+
#[allow(dead_code)] i32,
9+
#[allow(dead_code)] i32,
10+
#[allow(dead_code)] i32,
11+
);
712
type A = [i32; 4];
813

914
fn main() {

tests/fail/issue-miri-1112.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trait Empty {}
22

33
#[repr(transparent)]
4-
pub struct FunnyPointer(dyn Empty);
4+
pub struct FunnyPointer(#[allow(dead_code)] dyn Empty);
55

66
#[repr(C)]
77
pub struct Meta {

tests/fail/unaligned_pointers/drop_in_place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@compile-flags: -Cdebug-assertions=no
22

33
#[repr(transparent)]
4-
struct HasDrop(u8);
4+
struct HasDrop(#[allow(dead_code)] u8);
55

66
impl Drop for HasDrop {
77
fn drop(&mut self) {}

tests/fail/unaligned_pointers/promise_alignment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod utils;
77

88
#[repr(align(8))]
99
#[derive(Copy, Clone)]
10-
struct Align8(u64);
10+
struct Align8(#[allow(dead_code)] u64);
1111

1212
fn main() {
1313
let buffer = [0u32; 128]; // get some 4-aligned memory
@@ -35,7 +35,7 @@ fn main() {
3535
if cfg!(read_unaligned_ptr) {
3636
#[repr(align(16))]
3737
#[derive(Copy, Clone)]
38-
struct Align16(u128);
38+
struct Align16(#[allow(dead_code)] u128);
3939

4040
let align16 = if align8.addr() % 16 == 0 { align8 } else { align8.wrapping_add(2) };
4141
assert!(align16.addr() % 16 == 0);

0 commit comments

Comments
 (0)