File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2042,7 +2042,7 @@ impl<T: ?Sized> Drop for Weak<T> {
20422042 // the strong pointers have disappeared.
20432043 if inner. weak ( ) == 0 {
20442044 unsafe {
2045- Global . deallocate ( self . ptr . cast ( ) , Layout :: for_value ( self . ptr . as_ref ( ) ) ) ;
2045+ Global . deallocate ( self . ptr . cast ( ) , Layout :: for_value_raw ( self . ptr . as_ptr ( ) ) ) ;
20462046 }
20472047 }
20482048 }
Original file line number Diff line number Diff line change @@ -1927,7 +1927,7 @@ impl<T: ?Sized> Drop for Weak<T> {
19271927
19281928 if inner. weak . fetch_sub ( 1 , Release ) == 1 {
19291929 acquire ! ( inner. weak) ;
1930- unsafe { Global . deallocate ( self . ptr . cast ( ) , Layout :: for_value ( self . ptr . as_ref ( ) ) ) }
1930+ unsafe { Global . deallocate ( self . ptr . cast ( ) , Layout :: for_value_raw ( self . ptr . as_ptr ( ) ) ) }
19311931 }
19321932 }
19331933}
You can’t perform that action at this time.
0 commit comments