Skip to content

Commit cf02c51

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Remove feature maybe_uninit_slice
Summary: Trying to make starlark compile on stable or at least understand why it is not possible. So removing non-essential "feature" dependencies from starlark. Reviewed By: ndmitchell Differential Revision: D40893208 fbshipit-source-id: 5e20d1ae6913242afebd1250e77763bbfdb656e4
1 parent 9645eaf commit cf02c51

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

starlark/src/collections/alloca.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl Alloca {
144144
for x in data.iter_mut() {
145145
x.write(init());
146146
}
147-
let data = unsafe { MaybeUninit::slice_assume_init_mut(data) };
147+
let data = unsafe { &mut *(data as *mut [MaybeUninit<T>] as *mut [T]) };
148148
k(data)
149149
})
150150
}
@@ -176,7 +176,7 @@ impl Alloca {
176176
let _x_drop_guard = DropSliceGuard(x);
177177
let y = MaybeUninit::write_slice_cloned(y_uninit, y);
178178
let _y_drop_guard = DropSliceGuard(y);
179-
let xy = unsafe { MaybeUninit::slice_assume_init_mut(xy) };
179+
let xy = unsafe { &mut *(xy as *mut [MaybeUninit<T>] as *mut [T]) };
180180
k(xy)
181181
})
182182
}

starlark/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@
354354
#![feature(const_type_id)]
355355
#![cfg_attr(fbcode_build, feature(core_intrinsics))]
356356
#![feature(generic_associated_types)]
357-
#![feature(maybe_uninit_slice)]
358357
#![feature(maybe_uninit_write_slice)]
359358
#![feature(ptr_metadata)]
360359
#![feature(thread_local)]

0 commit comments

Comments
 (0)