diff options
Diffstat (limited to 'compiler/rustc_arena/src')
| -rw-r--r-- | compiler/rustc_arena/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_arena/src/lib.rs b/compiler/rustc_arena/src/lib.rs index 0d0b1efd2de..6f9cccf58dd 100644 --- a/compiler/rustc_arena/src/lib.rs +++ b/compiler/rustc_arena/src/lib.rs @@ -11,7 +11,6 @@ html_root_url = "https://doc.rust-lang.org/nightly/", test(no_crate_inject, attr(deny(warnings))) )] -#![feature(core_intrinsics)] #![feature(dropck_eyepatch)] #![feature(new_uninit)] #![feature(maybe_uninit_slice)] @@ -24,7 +23,6 @@ use smallvec::SmallVec; use std::alloc::Layout; use std::cell::{Cell, RefCell}; use std::cmp; -use std::intrinsics; use std::marker::{PhantomData, Send}; use std::mem::{self, MaybeUninit}; use std::ptr; @@ -122,7 +120,7 @@ impl<T> TypedArena<T> { unsafe { if mem::size_of::<T>() == 0 { - self.ptr.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1) as *mut T); + self.ptr.set((self.ptr.get() as *mut u8).wrapping_offset(1) as *mut T); let ptr = mem::align_of::<T>() as *mut T; // Don't drop the object. This `write` is equivalent to `forget`. ptr::write(ptr, object); |
