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 11
11
html_root_url = "https://doc.rust-lang.org/nightly/" ,
12
12
test( no_crate_inject, attr( deny( warnings) ) )
13
13
) ]
14
- #![ feature( core_intrinsics) ]
15
14
#![ feature( dropck_eyepatch) ]
16
15
#![ feature( raw_vec_internals) ]
17
16
#![ cfg_attr( test, feature( test) ) ]
@@ -25,7 +24,6 @@ use smallvec::SmallVec;
25
24
use std:: alloc:: Layout ;
26
25
use std:: cell:: { Cell , RefCell } ;
27
26
use std:: cmp;
28
- use std:: intrinsics;
29
27
use std:: marker:: { PhantomData , Send } ;
30
28
use std:: mem;
31
29
use std:: ptr;
@@ -130,7 +128,7 @@ impl<T> TypedArena<T> {
130
128
131
129
unsafe {
132
130
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 ) ;
134
132
let ptr = mem:: align_of :: < T > ( ) as * mut T ;
135
133
// Don't drop the object. This `write` is equivalent to `forget`.
136
134
ptr:: write ( ptr, object) ;
You can’t perform that action at this time.
0 commit comments