@@ -53,16 +53,10 @@ impl Drop for MiriAllocBytes {
5353 unsafe {
5454 match self . params {
5555 MiriAllocParams :: Global => alloc:: dealloc ( self . ptr , alloc_layout) ,
56- MiriAllocParams :: Isolated ( id) => {
57- #[ cfg( target_os = "linux" ) ]
58- {
59- IsolatedAlloc :: dealloc ( self . ptr , alloc_layout, id)
60- }
61- #[ cfg( not( target_os = "linux" ) ) ]
62- {
63- unreachable ! ( )
64- }
65- }
56+ #[ cfg( target_os = "linux" ) ]
57+ MiriAllocParams :: Isolated ( id) => IsolatedAlloc :: dealloc ( self . ptr , alloc_layout, id) ,
58+ #[ cfg( not( target_os = "linux" ) ) ]
59+ MiriAllocParams :: Isolated ( _) => unreachable ! ( ) ,
6660 }
6761 }
6862 }
@@ -127,16 +121,10 @@ impl AllocBytes for MiriAllocBytes {
127121 let alloc_fn = |layout| unsafe {
128122 match params {
129123 MiriAllocParams :: Global => alloc:: alloc ( layout) ,
130- MiriAllocParams :: Isolated ( id) => {
131- #[ cfg( target_os = "linux" ) ]
132- {
133- IsolatedAlloc :: alloc ( layout, id)
134- }
135- #[ cfg( not( target_os = "linux" ) ) ]
136- {
137- unreachable ! ( )
138- }
139- }
124+ #[ cfg( target_os = "linux" ) ]
125+ MiriAllocParams :: Isolated ( id) => IsolatedAlloc :: alloc ( layout, id) ,
126+ #[ cfg( not( target_os = "linux" ) ) ]
127+ MiriAllocParams :: Isolated ( _) => unreachable ! ( ) ,
140128 }
141129 } ;
142130 let alloc_bytes = MiriAllocBytes :: alloc_with ( size. to_u64 ( ) , align, params, alloc_fn)
@@ -156,16 +144,10 @@ impl AllocBytes for MiriAllocBytes {
156144 let alloc_fn = |layout| unsafe {
157145 match params {
158146 MiriAllocParams :: Global => alloc:: alloc_zeroed ( layout) ,
159- MiriAllocParams :: Isolated ( id) => {
160- #[ cfg( target_os = "linux" ) ]
161- {
162- IsolatedAlloc :: alloc_zeroed ( layout, id)
163- }
164- #[ cfg( not( target_os = "linux" ) ) ]
165- {
166- unreachable ! ( )
167- }
168- }
147+ #[ cfg( target_os = "linux" ) ]
148+ MiriAllocParams :: Isolated ( id) => IsolatedAlloc :: alloc_zeroed ( layout, id) ,
149+ #[ cfg( not( target_os = "linux" ) ) ]
150+ MiriAllocParams :: Isolated ( _) => unreachable ! ( ) ,
169151 }
170152 } ;
171153 MiriAllocBytes :: alloc_with ( size, align, params, alloc_fn) . ok ( )
0 commit comments