about summary refs log tree commit diff
path: root/library/core/src/ptr/alignment.rs
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-08-27 11:05:45 -0400
committerBen Kimock <kimockb@gmail.com>2025-05-21 09:10:06 -0400
commite36dc78edd4f166953afc0530500d589894ac412 (patch)
tree9c637f914c21840336e2e0eabd80067ee3f5421d /library/core/src/ptr/alignment.rs
parentbbd3a5ada41e0d4678de15d10404a4733dba4087 (diff)
downloadrust-e36dc78edd4f166953afc0530500d589894ac412.tar.gz
rust-e36dc78edd4f166953afc0530500d589894ac412.zip
Add some track_caller info to precondition panics
Diffstat (limited to 'library/core/src/ptr/alignment.rs')
-rw-r--r--library/core/src/ptr/alignment.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs
index 19311e39b45..3e66e271f03 100644
--- a/library/core/src/ptr/alignment.rs
+++ b/library/core/src/ptr/alignment.rs
@@ -73,6 +73,7 @@ impl Alignment {
     /// It must *not* be zero.
     #[unstable(feature = "ptr_alignment_type", issue = "102070")]
     #[inline]
+    #[track_caller]
     pub const unsafe fn new_unchecked(align: usize) -> Self {
         assert_unsafe_precondition!(
             check_language_ub,