Skip to content

Commit 75da81e

Browse files
committed
Change signature for move_val_init intrinsic to take *mut T for dest.
rebase update to typeck/check/mod.rs
1 parent b325e4f commit 75da81e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/libcore/intrinsics.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ extern "rust-intrinsic" {
184184
/// elements.
185185
pub fn size_of<T>() -> usize;
186186

187+
#[cfg(not(stage0))]
188+
/// Moves a value to an uninitialized memory location.
189+
///
190+
/// Drop glue is not run on the destination.
191+
pub fn move_val_init<T>(dst: *mut T, src: T);
192+
193+
// SNAP ba0e1cd
194+
#[cfg(stage0)]
187195
/// Moves a value to an uninitialized memory location.
188196
///
189197
/// Drop glue is not run on the destination.

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4894,9 +4894,7 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
48944894
"move_val_init" => {
48954895
(1,
48964896
vec!(
4897-
tcx.mk_mut_ref(tcx.mk_region(ty::ReLateBound(ty::DebruijnIndex::new(1),
4898-
ty::BrAnon(0))),
4899-
param(ccx, 0)),
4897+
tcx.mk_mut_ptr(param(ccx, 0)),
49004898
param(ccx, 0)
49014899
),
49024900
tcx.mk_nil())

0 commit comments

Comments
 (0)