From 7fa54c1d6838e4b343dcfa3e70c3d09246d5145c Mon Sep 17 00:00:00 2001 From: Pengfei Zhang Date: Fri, 15 Jun 2018 13:35:34 +0800 Subject: [PATCH] Fix the build error for the latest nightly-rust --- framework/src/allocators/cache_aligned.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/allocators/cache_aligned.rs b/framework/src/allocators/cache_aligned.rs index a2b8e1f710..66c4de38cc 100644 --- a/framework/src/allocators/cache_aligned.rs +++ b/framework/src/allocators/cache_aligned.rs @@ -1,4 +1,4 @@ -use std::alloc::{self, Alloc, Global, Layout, Opaque}; +use std::alloc::{self, Alloc, Global, Layout}; use std::fmt; use std::mem::size_of; use std::ops::{Deref, DerefMut}; @@ -18,7 +18,7 @@ impl Drop for CacheAligned { fn drop(&mut self) { unsafe { alloc::Global.dealloc( - NonNull::::new_unchecked(self.ptr.as_ptr() as *mut Opaque), + NonNull::::new_unchecked(self.ptr.as_ptr() as *mut u8), Layout::from_size_align(size_of::(), CACHE_LINE_SIZE).unwrap(), ); }