File tree Expand file tree Collapse file tree 2 files changed +22
-16
lines changed Expand file tree Collapse file tree 2 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,17 @@ impl<T: ?Sized> *const T {
1212     /// Therefore, two pointers that are null may still not compare equal to 
1313     /// each other. 
1414     /// 
15-      /// ## Behavior during const evaluation 
16-      /// 
17-      /// When this function is used during const evaluation, it may return `false` for pointers 
18-      /// that turn out to be null at runtime. Specifically, when a pointer to some memory 
19-      /// is offset beyond its bounds in such a way that the resulting pointer is null, 
20-      /// the function will still return `false`. There is no way for CTFE to know 
21-      /// the absolute position of that memory, so we cannot tell if the pointer is 
22-      /// null or not. 
15+      /// # Panics during const evaluation 
16+      /// 
17+      /// If this method is used during const evaluation, and `self` is a pointer 
18+      /// that is offset beyond the bounds of the memory it initially pointed to, 
19+      /// then there might not be enough information to determine whether the 
20+      /// pointer is null. This is because the absolute address in memory is not 
21+      /// known at compile time. If the nullness of the pointer cannot be 
22+      /// determined, this method will panic. 
23+      /// 
24+      /// In-bounds pointers are never null, so the method will never panic for 
25+      /// such pointers. 
2326     /// 
2427     /// # Examples 
2528     /// 
Original file line number Diff line number Diff line change @@ -12,14 +12,17 @@ impl<T: ?Sized> *mut T {
1212     /// Therefore, two pointers that are null may still not compare equal to 
1313     /// each other. 
1414     /// 
15-      /// ## Behavior during const evaluation 
16-      /// 
17-      /// When this function is used during const evaluation, it may return `false` for pointers 
18-      /// that turn out to be null at runtime. Specifically, when a pointer to some memory 
19-      /// is offset beyond its bounds in such a way that the resulting pointer is null, 
20-      /// the function will still return `false`. There is no way for CTFE to know 
21-      /// the absolute position of that memory, so we cannot tell if the pointer is 
22-      /// null or not. 
15+      /// # Panics during const evaluation 
16+      /// 
17+      /// If this method is used during const evaluation, and `self` is a pointer 
18+      /// that is offset beyond the bounds of the memory it initially pointed to, 
19+      /// then there might not be enough information to determine whether the 
20+      /// pointer is null. This is because the absolute address in memory is not 
21+      /// known at compile time. If the nullness of the pointer cannot be 
22+      /// determined, this method will panic. 
23+      /// 
24+      /// In-bounds pointers are never null, so the method will never panic for 
25+      /// such pointers. 
2326     /// 
2427     /// # Examples 
2528     /// 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments