]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/ptr/const_ptr.rs
Rollup merge of #103616 - rust-lang:notriddle/moz-box-sizing, r=GuillaumeGomez
[rust.git] / library / core / src / ptr / const_ptr.rs
index ed16c5f051f7bf5d065a52265c4ac89ef3a3d475..5a083227bb0efda119a32a6458b3d129affaace6 100644 (file)
@@ -761,7 +761,10 @@ pub fn mask(self, mask: usize) -> *const T {
         // SAFETY: The comparison has no side-effects, and the intrinsic
         // does this check internally in the CTFE implementation.
         unsafe {
-            assert_unsafe_precondition!([T](this: *const T, origin: *const T) => this >= origin)
+            assert_unsafe_precondition!(
+                "ptr::sub_ptr requires `this >= origin`",
+                [T](this: *const T, origin: *const T) => this >= origin
+            )
         };
 
         let pointee_size = mem::size_of::<T>();