@@ -247,6 +247,13 @@ impl<T: ?Sized> *mut T {
247247 /// When calling this method, you have to ensure that *either* the pointer is null *or*
248248 /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
249249 ///
250+ /// # Panics during const evaluation
251+ ///
252+ /// This method will panic during const evaluation if the pointer cannot be
253+ /// determined to be null or not. See [`is_null`] for more information.
254+ ///
255+ /// [`is_null`]: #method.is_null-1
256+ ///
250257 /// # Examples
251258 ///
252259 /// ```
@@ -331,6 +338,13 @@ impl<T: ?Sized> *mut T {
331338 /// Note that because the created reference is to `MaybeUninit<T>`, the
332339 /// source pointer can point to uninitialized memory.
333340 ///
341+ /// # Panics during const evaluation
342+ ///
343+ /// This method will panic during const evaluation if the pointer cannot be
344+ /// determined to be null or not. See [`is_null`] for more information.
345+ ///
346+ /// [`is_null`]: #method.is_null-1
347+ ///
334348 /// # Examples
335349 ///
336350 /// ```
@@ -595,6 +609,12 @@ impl<T: ?Sized> *mut T {
595609 /// the pointer is null *or*
596610 /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
597611 ///
612+ /// # Panics during const evaluation
613+ ///
614+ /// This method will panic during const evaluation if the pointer cannot be
615+ /// determined to be null or not. See [`is_null`] for more information.
616+ ///
617+ /// [`is_null`]: #method.is_null-1
598618 ///
599619 /// # Examples
600620 ///
@@ -678,6 +698,13 @@ impl<T: ?Sized> *mut T {
678698 ///
679699 /// When calling this method, you have to ensure that *either* the pointer is null *or*
680700 /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
701+ ///
702+ /// # Panics during const evaluation
703+ ///
704+ /// This method will panic during const evaluation if the pointer cannot be
705+ /// determined to be null or not. See [`is_null`] for more information.
706+ ///
707+ /// [`is_null`]: #method.is_null-1
681708 #[ inline]
682709 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
683710 #[ rustc_const_unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
@@ -1950,6 +1977,13 @@ impl<T> *mut [T] {
19501977 ///
19511978 /// [valid]: crate::ptr#safety
19521979 /// [allocated object]: crate::ptr#allocated-object
1980+ ///
1981+ /// # Panics during const evaluation
1982+ ///
1983+ /// This method will panic during const evaluation if the pointer cannot be
1984+ /// determined to be null or not. See [`is_null`] for more information.
1985+ ///
1986+ /// [`is_null`]: #method.is_null-1
19531987 #[ inline]
19541988 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
19551989 #[ rustc_const_unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
@@ -2002,6 +2036,13 @@ impl<T> *mut [T] {
20022036 ///
20032037 /// [valid]: crate::ptr#safety
20042038 /// [allocated object]: crate::ptr#allocated-object
2039+ ///
2040+ /// # Panics during const evaluation
2041+ ///
2042+ /// This method will panic during const evaluation if the pointer cannot be
2043+ /// determined to be null or not. See [`is_null`] for more information.
2044+ ///
2045+ /// [`is_null`]: #method.is_null-1
20052046 #[ inline]
20062047 #[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
20072048 #[ rustc_const_unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
0 commit comments