Skip to content

Commit 04223bf

Browse files
committed
fix(core): adapt to the change in guaranteed_eq's return type
This change has occurred in [rust-lang/rust#101483][1]. [1]: rust-lang/rust#101483
1 parent ee14441 commit 04223bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/r3_core/src/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl Closure {
138138
} else {
139139
let env = core::intrinsics::const_allocate(size, align);
140140
assert!(
141-
!env.guaranteed_eq(core::ptr::null_mut()),
141+
!env.guaranteed_eq(core::ptr::null_mut()).unwrap_or(false),
142142
"heap allocation failed"
143143
);
144144
env.cast::<T>().write(func);

src/r3_core/src/utils/freeze.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<T: Copy> Frozen<T> {
5858
// Allocate a CTFE heap memory block
5959
let ptr = core::intrinsics::const_allocate(size, align).cast::<T>();
6060
assert!(
61-
!ptr.guaranteed_eq(core::ptr::null_mut()),
61+
!ptr.guaranteed_eq(core::ptr::null_mut()).unwrap_or(false),
6262
"heap allocation failed"
6363
);
6464

0 commit comments

Comments
 (0)