@@ -246,6 +246,13 @@ impl<T: ?Sized> *mut T {
246246 /// When calling this method, you have to ensure that *either* the pointer is null *or*
247247 /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
248248 ///
249+ /// # Panics during const evaluation
250+ ///
251+ /// This method will panic during const evaluation if the pointer cannot be
252+ /// determined to be null or not. See [`is_null`] for more information.
253+ ///
254+ /// [`is_null`]: #method.is_null-1
255+ ///
249256 /// # Examples
250257 ///
251258 /// ```
@@ -330,6 +337,13 @@ impl<T: ?Sized> *mut T {
330337 /// Note that because the created reference is to `MaybeUninit<T>`, the
331338 /// source pointer can point to uninitialized memory.
332339 ///
340+ /// # Panics during const evaluation
341+ ///
342+ /// This method will panic during const evaluation if the pointer cannot be
343+ /// determined to be null or not. See [`is_null`] for more information.
344+ ///
345+ /// [`is_null`]: #method.is_null-1
346+ ///
333347 /// # Examples
334348 ///
335349 /// ```
@@ -593,6 +607,12 @@ impl<T: ?Sized> *mut T {
593607 /// the pointer is null *or*
594608 /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
595609 ///
610+ /// # Panics during const evaluation
611+ ///
612+ /// This method will panic during const evaluation if the pointer cannot be
613+ /// determined to be null or not. See [`is_null`] for more information.
614+ ///
615+ /// [`is_null`]: #method.is_null-1
596616 ///
597617 /// # Examples
598618 ///
@@ -676,6 +696,13 @@ impl<T: ?Sized> *mut T {
676696 ///
677697 /// When calling this method, you have to ensure that *either* the pointer is null *or*
678698 /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
699+ ///
700+ /// # Panics during const evaluation
701+ ///
702+ /// This method will panic during const evaluation if the pointer cannot be
703+ /// determined to be null or not. See [`is_null`] for more information.
704+ ///
705+ /// [`is_null`]: #method.is_null-1
679706 #[ inline]
680707 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
681708 pub const unsafe fn as_uninit_mut < ' a > ( self ) -> Option < & ' a mut MaybeUninit < T > >
@@ -1952,6 +1979,13 @@ impl<T> *mut [T] {
19521979 ///
19531980 /// [valid]: crate::ptr#safety
19541981 /// [allocated object]: crate::ptr#allocated-object
1982+ ///
1983+ /// # Panics during const evaluation
1984+ ///
1985+ /// This method will panic during const evaluation if the pointer cannot be
1986+ /// determined to be null or not. See [`is_null`] for more information.
1987+ ///
1988+ /// [`is_null`]: #method.is_null-1
19551989 #[ inline]
19561990 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
19571991 pub const unsafe fn as_uninit_slice < ' a > ( self ) -> Option < & ' a [ MaybeUninit < T > ] > {
@@ -2003,6 +2037,13 @@ impl<T> *mut [T] {
20032037 ///
20042038 /// [valid]: crate::ptr#safety
20052039 /// [allocated object]: crate::ptr#allocated-object
2040+ ///
2041+ /// # Panics during const evaluation
2042+ ///
2043+ /// This method will panic during const evaluation if the pointer cannot be
2044+ /// determined to be null or not. See [`is_null`] for more information.
2045+ ///
2046+ /// [`is_null`]: #method.is_null-1
20062047 #[ inline]
20072048 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
20082049 pub const unsafe fn as_uninit_slice_mut < ' a > ( self ) -> Option < & ' a mut [ MaybeUninit < T > ] > {
0 commit comments