File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -822,7 +822,7 @@ where
822822
823823/// Helper function for `drop_in_place`. The compiler replaces this by the actual drop glue.
824824#[ lang = "drop_glue" ]
825- const unsafe fn drop_glue < T : PointeeSized > ( _: & mut T )
825+ pub ( crate ) const unsafe fn drop_glue < T : PointeeSized > ( _: & mut T )
826826where
827827 T : [ const ] Destruct ,
828828{
Original file line number Diff line number Diff line change @@ -1116,12 +1116,12 @@ impl<T: PointeeSized> NonNull<T> {
11161116 #[ inline( always) ]
11171117 #[ stable( feature = "non_null_convenience" , since = "1.80.0" ) ]
11181118 #[ rustc_const_unstable( feature = "const_drop_in_place" , issue = "109342" ) ]
1119- pub const unsafe fn drop_in_place ( self )
1119+ pub const unsafe fn drop_in_place ( mut self )
11201120 where
11211121 T : [ const ] Destruct ,
11221122 {
11231123 // SAFETY: the caller must uphold the safety contract for `drop_in_place`.
1124- unsafe { ptr:: drop_in_place ( self . as_ptr ( ) ) }
1124+ unsafe { ptr:: drop_glue ( self . as_mut ( ) ) }
11251125 }
11261126
11271127 /// Overwrites a memory location with the given value without reading or
You can’t perform that action at this time.
0 commit comments