Skip to content

Commit 51ff5cd

Browse files
committed
Auto merge of #3395 - rust-lang:rustup-2024-03-23, r=saethlin
Automatic Rustup
2 parents 21499cc + 4ee553e commit 51ff5cd

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1447f9d38ca388ca178a544534b3cff72945fa1e
1+
c3b05c6e5b5b59613350b8c2875b0add67ed74df

src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl NewPermission {
9090
}
9191
}
9292
}
93-
ty::RawPtr(ty::TypeAndMut { mutbl: Mutability::Mut, .. }) => {
93+
ty::RawPtr(_, Mutability::Mut) => {
9494
assert!(protector.is_none()); // RetagKind can't be both FnEntry and Raw.
9595
// Mutable raw pointer. No access, not protected.
9696
NewPermission::Uniform {
@@ -114,7 +114,7 @@ impl NewPermission {
114114
// This fixes https://github.com/rust-lang/rust/issues/55005.
115115
}
116116
}
117-
ty::RawPtr(ty::TypeAndMut { mutbl: Mutability::Not, .. }) => {
117+
ty::RawPtr(_, Mutability::Not) => {
118118
assert!(protector.is_none()); // RetagKind can't be both FnEntry and Raw.
119119
// `*const T`, when freshly created, are read-only in the frozen part.
120120
NewPermission::FreezeSensitive {

src/borrow_tracker/tree_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
475475
NewPermission::from_ref_ty(pointee, mutability, self.kind, self.ecx);
476476
self.retag_ptr_inplace(place, new_perm)?;
477477
}
478-
ty::RawPtr(_) => {
478+
ty::RawPtr(_, _) => {
479479
// We definitely do *not* want to recurse into raw pointers -- wide raw
480480
// pointers have fields, and for dyn Trait pointees those can have reference
481481
// type!

src/machine.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use rand::rngs::StdRng;
1212
use rand::Rng;
1313
use rand::SeedableRng;
1414

15-
use rustc_ast::ast::Mutability;
1615
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1716
#[allow(unused)]
1817
use rustc_data_structures::static_assert_size;
@@ -22,7 +21,7 @@ use rustc_middle::{
2221
ty::{
2322
self,
2423
layout::{LayoutCx, LayoutError, LayoutOf, TyAndLayout},
25-
Instance, Ty, TyCtxt, TypeAndMut,
24+
Instance, Ty, TyCtxt,
2625
},
2726
};
2827
use rustc_span::def_id::{CrateNum, DefId};
@@ -373,10 +372,8 @@ pub struct PrimitiveLayouts<'tcx> {
373372
impl<'mir, 'tcx: 'mir> PrimitiveLayouts<'tcx> {
374373
fn new(layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Result<Self, &'tcx LayoutError<'tcx>> {
375374
let tcx = layout_cx.tcx;
376-
let mut_raw_ptr =
377-
Ty::new_ptr(tcx, TypeAndMut { ty: tcx.types.unit, mutbl: Mutability::Mut });
378-
let const_raw_ptr =
379-
Ty::new_ptr(tcx, TypeAndMut { ty: tcx.types.unit, mutbl: Mutability::Not });
375+
let mut_raw_ptr = Ty::new_mut_ptr(tcx, tcx.types.unit);
376+
let const_raw_ptr = Ty::new_imm_ptr(tcx, tcx.types.unit);
380377
Ok(Self {
381378
unit: layout_cx.layout_of(Ty::new_unit(tcx))?,
382379
i8: layout_cx.layout_of(tcx.types.i8)?,

src/shims/unix/linux/fd/epoll.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ pub struct Epoll {
2121
/// <https://man7.org/linux/man-pages/man2/epoll_ctl.2.html>
2222
#[derive(Clone, Debug)]
2323
pub struct EpollEvent {
24+
#[allow(dead_code)]
2425
pub events: u32,
2526
/// `Scalar<Provenance>` is used to represent the
2627
/// `epoll_data` type union.
28+
#[allow(dead_code)]
2729
pub data: Scalar<Provenance>,
2830
}
2931

0 commit comments

Comments
 (0)