From fa9a911a57eff5d2cd59eacbffb4e41bc721db2e Mon Sep 17 00:00:00 2001 From: joboet Date: Sat, 13 Jan 2024 20:10:00 +0100 Subject: libs: use `assert_unchecked` instead of intrinsic --- library/core/src/alloc/global.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/core/src/alloc') diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs index c582111701a..a1fff6707bd 100644 --- a/library/core/src/alloc/global.rs +++ b/library/core/src/alloc/global.rs @@ -110,7 +110,7 @@ use crate::ptr; /// ```rust,ignore (unsound and has placeholders) /// drop(Box::new(42)); /// let number_of_heap_allocs = /* call private allocator API */; -/// unsafe { std::intrinsics::assume(number_of_heap_allocs > 0); } +/// unsafe { std::hint::assert_unchecked(number_of_heap_allocs > 0); } /// ``` /// /// Note that the optimizations mentioned above are not the only -- cgit 1.4.1-3-g733a5