Skip to content

Commit cbe6035

Browse files
CoAlloc: co_alloc_pref changed to 0usize - and (at least now) no ICE.
1 parent 4aea4f9 commit cbe6035

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/alloc/src/macros.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,17 @@ macro_rules! co_alloc_pref {
262262
#[unstable(feature = "global_co_alloc", issue = "none")]
263263
#[macro_export]
264264
macro_rules! meta_num_slots {
265+
// Generating, for example, (0 as usize), here, triggers an ICE.
266+
265267
// This "validates" types of both params - to prevent mix ups.
266268
// @FIXME remove this comment line: Removing/commenting out the part: <$alloc as ::core::alloc::Allocator>::CO_ALLOC_META_NUM_SLOTS +
267269
// does NOT fix the ICE (unless there are multiple ICE's).
268270
($alloc:ty, $co_alloc_pref:expr) => {
269-
(
271+
/*(
270272
((<$alloc as ::core::alloc::Allocator>::CO_ALLOC_META_NUM_SLOTS + (0 as ::core::alloc::CoAllocatorMetaNumSlots))0
271273
as usize)
272274
* ($co_alloc_pref + (0 as $crate::co_alloc::CoAllocPref))
273-
as usize)
275+
as usize)*/0usize
274276
};
275277
}
276278
// -\---> replace with something like:

0 commit comments

Comments
 (0)