@@ -247,6 +247,13 @@ impl<T: ?Sized> *mut T {
247
247
/// When calling this method, you have to ensure that *either* the pointer is null *or*
248
248
/// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
249
249
///
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
+ ///
250
257
/// # Examples
251
258
///
252
259
/// ```
@@ -331,6 +338,13 @@ impl<T: ?Sized> *mut T {
331
338
/// Note that because the created reference is to `MaybeUninit<T>`, the
332
339
/// source pointer can point to uninitialized memory.
333
340
///
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
+ ///
334
348
/// # Examples
335
349
///
336
350
/// ```
@@ -595,6 +609,12 @@ impl<T: ?Sized> *mut T {
595
609
/// the pointer is null *or*
596
610
/// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
597
611
///
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
598
618
///
599
619
/// # Examples
600
620
///
@@ -678,6 +698,13 @@ impl<T: ?Sized> *mut T {
678
698
///
679
699
/// When calling this method, you have to ensure that *either* the pointer is null *or*
680
700
/// 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
681
708
#[ inline]
682
709
#[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
683
710
#[ rustc_const_unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
@@ -1950,6 +1977,13 @@ impl<T> *mut [T] {
1950
1977
///
1951
1978
/// [valid]: crate::ptr#safety
1952
1979
/// [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
1953
1987
#[ inline]
1954
1988
#[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
1955
1989
#[ rustc_const_unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
@@ -2002,6 +2036,13 @@ impl<T> *mut [T] {
2002
2036
///
2003
2037
/// [valid]: crate::ptr#safety
2004
2038
/// [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
2005
2046
#[ inline]
2006
2047
#[ unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
2007
2048
#[ rustc_const_unstable( feature = "ptr_as_uninit" , issue = "75402" ) ]
0 commit comments