File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3350,7 +3350,6 @@ dependencies = [
33503350name = " rustc_arena"
33513351version = " 0.0.0"
33523352dependencies = [
3353- " rustc_data_structures" ,
33543353 " smallvec 1.4.2" ,
33553354]
33563355
Original file line number Diff line number Diff line change @@ -5,5 +5,4 @@ version = "0.0.0"
55edition = " 2018"
66
77[dependencies ]
8- rustc_data_structures = { path = " ../rustc_data_structures" }
98smallvec = { version = " 1.0" , features = [" union" , " may_dangle" ] }
Original file line number Diff line number Diff line change 1616#![ feature( maybe_uninit_slice) ]
1717#![ cfg_attr( test, feature( test) ) ]
1818
19- use rustc_data_structures:: cold_path;
2019use smallvec:: SmallVec ;
2120
2221use std:: alloc:: Layout ;
@@ -27,6 +26,12 @@ use std::mem::{self, MaybeUninit};
2726use std:: ptr;
2827use std:: slice;
2928
29+ #[ inline( never) ]
30+ #[ cold]
31+ pub fn cold_path < F : FnOnce ( ) -> R , R > ( f : F ) -> R {
32+ f ( )
33+ }
34+
3035/// An arena that can hold objects of only one type.
3136pub struct TypedArena < T > {
3237 /// A pointer to the next object to be allocated.
You can’t perform that action at this time.
0 commit comments