File tree 2 files changed +2
-2
lines changed
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> {
2042
2042
// the strong pointers have disappeared.
2043
2043
if inner. weak ( ) == 0 {
2044
2044
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 ( ) ) ) ;
2046
2046
}
2047
2047
}
2048
2048
}
Original file line number Diff line number Diff line change @@ -1927,7 +1927,7 @@ impl<T: ?Sized> Drop for Weak<T> {
1927
1927
1928
1928
if inner. weak . fetch_sub ( 1 , Release ) == 1 {
1929
1929
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 ( ) ) ) }
1931
1931
}
1932
1932
}
1933
1933
}
You can’t perform that action at this time.
0 commit comments