Skip to content

Commit 903bfd8

Browse files
committed
Auto merge of #1681 - RalfJung:rustup, r=RalfJung
rustup; remove some intrinsics that are gone or moved to rustc
2 parents d814eaa + 3d01ba1 commit 903bfd8

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4e208f6a3afb42528878b0f3464e337c4bf3bbc8
1+
0677d9729318441a1cdb0c74812ec4140fa4d35f

src/shims/intrinsics.rs

-33
Original file line numberDiff line numberDiff line change
@@ -51,39 +51,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
5151
}
5252

5353
// Raw memory accesses
54-
#[rustfmt::skip]
55-
| "copy"
56-
| "copy_nonoverlapping"
57-
=> {
58-
let &[src, dest, count] = check_arg_count(args)?;
59-
let elem_ty = instance.substs.type_at(0);
60-
let elem_layout = this.layout_of(elem_ty)?;
61-
let count = this.read_scalar(count)?.to_machine_usize(this)?;
62-
let elem_align = elem_layout.align.abi;
63-
64-
let size = elem_layout.size.checked_mul(count, this)
65-
.ok_or_else(|| err_ub_format!("overflow computing total size of `{}`", intrinsic_name))?;
66-
let src = this.read_scalar(src)?.check_init()?;
67-
let src = this.memory.check_ptr_access(src, size, elem_align)?;
68-
let dest = this.read_scalar(dest)?.check_init()?;
69-
let dest = this.memory.check_ptr_access(dest, size, elem_align)?;
70-
71-
if let (Some(src), Some(dest)) = (src, dest) {
72-
this.memory.copy(
73-
src,
74-
dest,
75-
size,
76-
intrinsic_name.ends_with("_nonoverlapping"),
77-
)?;
78-
}
79-
}
80-
81-
"move_val_init" => {
82-
let &[place, dest] = check_arg_count(args)?;
83-
let place = this.deref_operand(place)?;
84-
this.copy_op(dest, place.into())?;
85-
}
86-
8754
"volatile_load" => {
8855
let &[place] = check_arg_count(args)?;
8956
let place = this.deref_operand(place)?;

0 commit comments

Comments
 (0)