Skip to content

Commit 0b60c19

Browse files
authored
Merge pull request #4417 from rust-lang/rustup-2025-06-28
Automatic Rustup
2 parents 0b76b73 + c9163fe commit 0b60c19

File tree

25 files changed

+17
-31
lines changed

25 files changed

+17
-31
lines changed

cargo-miri/src/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn setup(
8383
SysrootConfig::NoStd
8484
} else {
8585
SysrootConfig::WithStd {
86-
std_features: ["panic_unwind", "backtrace"].into_iter().map(Into::into).collect(),
86+
std_features: ["panic-unwind", "backtrace"].into_iter().map(Into::into).collect(),
8787
}
8888
};
8989
let cargo_cmd = {

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
255aa220821c05c3eac7605fce4ea1c9ab2cbdb4
1+
d41e12f1f4e4884c356f319b881921aa37040de5

src/alloc/isolated_alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl IsolatedAlloc {
189189
};
190190
assert_ne!(page_ptr.addr(), usize::MAX, "mmap failed");
191191
// `page_infos` has to have one bit for each `COMPRESSION_FACTOR`-sized chunk of bytes in the page.
192-
assert!(self.page_size % COMPRESSION_FACTOR == 0);
192+
assert!(self.page_size.is_multiple_of(COMPRESSION_FACTOR));
193193
self.page_infos.push(DenseBitSet::new_empty(self.page_size / COMPRESSION_FACTOR));
194194
self.page_ptrs.push(NonNull::new(page_ptr).unwrap());
195195
(NonNull::new(page_ptr).unwrap(), self.page_infos.last_mut().unwrap())

src/alloc_addresses/reuse_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl ReusePool {
129129
let idx = rng.random_range(begin..end);
130130
// Remove it from the pool and return.
131131
let (chosen_addr, chosen_size, chosen_thread, clock) = subpool.remove(idx);
132-
debug_assert!(chosen_size >= size && chosen_addr % align.bytes() == 0);
132+
debug_assert!(chosen_size >= size && chosen_addr.is_multiple_of(align.bytes()));
133133
debug_assert!(cross_thread_reuse || chosen_thread == thread);
134134
// No synchronization needed if we reused from the current thread.
135135
Some((chosen_addr, if chosen_thread == thread { None } else { Some(clock) }))

src/bin/miri.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
296296
level: SymbolExportLevel::C,
297297
kind: SymbolExportKind::Text,
298298
used: false,
299+
rustc_std_internal_symbol: false,
299300
},
300301
))
301302
} else {

src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ trait EvalContextPrivExt<'tcx, 'ecx>: crate::MiriInterpCxExt<'tcx> {
814814
info: RetagInfo, // diagnostics info about this retag
815815
) -> InterpResult<'tcx, MPlaceTy<'tcx>> {
816816
let this = self.eval_context_mut();
817-
let size = this.size_and_align_of_mplace(place)?.map(|(size, _)| size);
817+
let size = this.size_and_align_of_val(place)?.map(|(size, _)| size);
818818
// FIXME: If we cannot determine the size (because the unsized tail is an `extern type`),
819819
// bail out -- we cannot reasonably figure out which memory range to reborrow.
820820
// See https://github.com/rust-lang/unsafe-code-guidelines/issues/276.

src/borrow_tracker/tree_borrows/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,8 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
468468
// - when `extern type` is involved we use the size of the known prefix,
469469
// - if the pointer is not reborrowed (raw pointer) then we override the size
470470
// to do a zero-length reborrow.
471-
let reborrow_size = this
472-
.size_and_align_of_mplace(place)?
473-
.map(|(size, _)| size)
474-
.unwrap_or(place.layout.size);
471+
let reborrow_size =
472+
this.size_and_align_of_val(place)?.map(|(size, _)| size).unwrap_or(place.layout.size);
475473
trace!("Creating new permission: {:?} with size {:?}", new_perm, reborrow_size);
476474

477475
// This new tag is not guaranteed to actually be used.

src/borrow_tracker/tree_borrows/unimap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ mod tests {
327327
for i in 0..1000 {
328328
i.hash(&mut hasher);
329329
let rng = hasher.finish();
330-
let op = rng % 3 == 0;
330+
let op = rng.is_multiple_of(3);
331331
let key = (rng / 2) % 50;
332332
let val = (rng / 100) % 1000;
333333
if op {

src/eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc_abi::ExternAbi;
1111
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1212
use rustc_hir::def::Namespace;
1313
use rustc_hir::def_id::DefId;
14-
use rustc_middle::ty::layout::{LayoutCx, LayoutOf};
14+
use rustc_middle::ty::layout::LayoutCx;
1515
use rustc_middle::ty::{self, Ty, TyCtxt};
1616
use rustc_session::config::EntryFnType;
1717

src/helpers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
489489
trace!("visit_frozen(place={:?}, size={:?})", *place, size);
490490
debug_assert_eq!(
491491
size,
492-
this.size_and_align_of_mplace(place)?
492+
this.size_and_align_of_val(place)?
493493
.map(|(size, _)| size)
494494
.unwrap_or_else(|| place.layout.size)
495495
);
@@ -530,7 +530,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
530530
trace!("unsafe_cell_action on {:?}", place.ptr());
531531
// We need a size to go on.
532532
let unsafe_cell_size = this
533-
.size_and_align_of_mplace(place)?
533+
.size_and_align_of_val(place)?
534534
.map(|(size, _)| size)
535535
// for extern types, just cover what we can
536536
.unwrap_or_else(|| place.layout.size);

0 commit comments

Comments
 (0)