File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 1111 html_root_url = "https://doc.rust-lang.org/nightly/" ,
1212 test( no_crate_inject, attr( deny( warnings) ) )
1313) ]
14- #![ feature( core_intrinsics) ]
1514#![ feature( dropck_eyepatch) ]
1615#![ feature( raw_vec_internals) ]
1716#![ cfg_attr( test, feature( test) ) ]
@@ -25,7 +24,6 @@ use smallvec::SmallVec;
2524use std:: alloc:: Layout ;
2625use std:: cell:: { Cell , RefCell } ;
2726use std:: cmp;
28- use std:: intrinsics;
2927use std:: marker:: { PhantomData , Send } ;
3028use std:: mem;
3129use std:: ptr;
@@ -130,7 +128,7 @@ impl<T> TypedArena<T> {
130128
131129 unsafe {
132130 if mem:: size_of :: < T > ( ) == 0 {
133- self . ptr . set ( intrinsics :: arith_offset ( self . ptr . get ( ) as * mut u8 , 1 ) as * mut T ) ;
131+ self . ptr . set ( ( self . ptr . get ( ) as * mut u8 ) . wrapping_offset ( 1 ) as * mut T ) ;
134132 let ptr = mem:: align_of :: < T > ( ) as * mut T ;
135133 // Don't drop the object. This `write` is equivalent to `forget`.
136134 ptr:: write ( ptr, object) ;
You can’t perform that action at this time.
0 commit comments