Skip to content

Commit df8a2b4

Browse files
committed
Auto merge of #1954 - RalfJung:rustup, r=RalfJung
rustup Cc rust-lang/rust#92527
2 parents e934315 + 808f794 commit df8a2b4

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4f49627c6fe2a32d1fed6310466bb0e1c535c0c0
1+
ddabe0775c5f5b551d5eb54e3c4366fb8bec0c92

src/machine.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::fmt;
77
use std::num::NonZeroU64;
88
use std::time::Instant;
99

10-
use log::trace;
1110
use rand::rngs::StdRng;
1211
use rand::SeedableRng;
1312

@@ -503,35 +502,6 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
503502
ecx.binary_ptr_op(bin_op, left, right)
504503
}
505504

506-
fn box_alloc(
507-
ecx: &mut InterpCx<'mir, 'tcx, Self>,
508-
dest: &PlaceTy<'tcx, Tag>,
509-
) -> InterpResult<'tcx> {
510-
trace!("box_alloc for {:?}", dest.layout.ty);
511-
let layout = ecx.layout_of(dest.layout.ty.builtin_deref(false).unwrap().ty)?;
512-
// First argument: `size`.
513-
// (`0` is allowed here -- this is expected to be handled by the lang item).
514-
let size = Scalar::from_machine_usize(layout.size.bytes(), ecx);
515-
516-
// Second argument: `align`.
517-
let align = Scalar::from_machine_usize(layout.align.abi.bytes(), ecx);
518-
519-
// Call the `exchange_malloc` lang item.
520-
let malloc = ecx.tcx.lang_items().exchange_malloc_fn().unwrap();
521-
let malloc = ty::Instance::mono(ecx.tcx.tcx, malloc);
522-
ecx.call_function(
523-
malloc,
524-
Abi::Rust,
525-
&[size.into(), align.into()],
526-
Some(dest),
527-
// Don't do anything when we are done. The `statement()` function will increment
528-
// the old stack frame's stmt counter to the next statement, which means that when
529-
// `exchange_malloc` returns, we go on evaluating exactly where we want to be.
530-
StackPopCleanup::None { cleanup: true },
531-
)?;
532-
Ok(())
533-
}
534-
535505
fn thread_local_static_base_pointer(
536506
ecx: &mut InterpCx<'mir, 'tcx, Self>,
537507
def_id: DefId,

0 commit comments

Comments
 (0)