BOX!

parent 2b5731f6
......@@ -76,7 +76,7 @@ pub mod uic{
lazy_static!{
static ref UIC : Box<[AtomicF64; MAX_UIC_MEMOIZATION]> = {
let mut result : Box<[AtomicF64; MAX_UIC_MEMOIZATION]> = unsafe { Box::new(std::mem::uninitialized()) };
let mut result : Box<[AtomicF64; MAX_UIC_MEMOIZATION]> = unsafe { box std::mem::uninitialized() };
for i in 0..MAX_UIC_MEMOIZATION {
let uninit = std::mem::replace(&mut result[i], AtomicF64::new(0.0));
std::mem::forget(uninit)
......
#![feature(integer_atomics)]
#![feature(box_syntax)]
#[macro_use]
extern crate lazy_static;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment