From 0f1cb9234574d3d39c85b5b98a306306e20f068b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 20 Feb 2025 13:58:27 -0500 Subject: [PATCH] [ruby/mmtk] Fix compatibility for Rust 1.85 https://github.com/ruby/mmtk/commit/9da566e26a --- gc/mmtk/src/abi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gc/mmtk/src/abi.rs b/gc/mmtk/src/abi.rs index 5b56d199b2..fc9c899743 100644 --- a/gc/mmtk/src/abi.rs +++ b/gc/mmtk/src/abi.rs @@ -163,7 +163,7 @@ impl ObjectClosure { F2: 'env + FnOnce() -> T, { debug_assert!( - self.c_function == THE_UNREGISTERED_CLOSURE_FUNC, + std::ptr::fn_addr_eq(self.c_function, THE_UNREGISTERED_CLOSURE_FUNC), "set_temporarily_and_run_code is recursively called." ); self.c_function = Self::c_function_registered::;