File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,15 @@ pub trait Drop {
9999/// Given that a [`panic!`] will call `drop` as it unwinds, any [`panic!`] 
100100/// in a `drop` implementation will likely abort. 
101101/// 
102+ /// Note that even if this panics, the value is considered to be dropped; 
103+ /// you must not cause `drop` to be called again. This is normally automatically 
104+ /// handled by the compiler, but when using unsafe code, can sometimes occur 
105+ /// unintentionally, particularly when using [`std::ptr::drop_in_place`]. 
106+ /// 
102107/// [E0040]: ../../error-index.html#E0040 
103108/// [`panic!`]: ../macro.panic.html 
104109/// [`std::mem::drop`]: ../../std/mem/fn.drop.html 
110+ /// [`std::ptr::drop_in_place`]: ../../std/ptr/fn.drop_in_place.html 
105111#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
106112    fn  drop ( & mut  self ) ; 
107113} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments