about summary refs log tree commit diff
path: root/library/core/src/alloc
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2024-01-13 20:10:00 +0100
committerjoboet <jonasboettiger@icloud.com>2024-01-13 20:10:00 +0100
commitfa9a911a57eff5d2cd59eacbffb4e41bc721db2e (patch)
treebe7dbf9dcc0c9d7639d68111762adbd962e6ee11 /library/core/src/alloc
parent174e73a3f6df6f96ab453493796e461164dea94a (diff)
downloadrust-fa9a911a57eff5d2cd59eacbffb4e41bc721db2e.tar.gz
rust-fa9a911a57eff5d2cd59eacbffb4e41bc721db2e.zip
libs: use `assert_unchecked` instead of intrinsic
Diffstat (limited to 'library/core/src/alloc')
-rw-r--r--library/core/src/alloc/global.rs2
1 files changed, 1 insertions, 1 deletions
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