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 @@ -1711,7 +1711,7 @@ impl<T> Weak<T> {
1711
1711
// because dangling weaks are only created for sized T. wrapping_offset
1712
1712
// is used so that we can use the same code path for dangling weak refs.
1713
1713
unsafe {
1714
- let offset = data_offset ( & raw const ( * ptr ) . value ) ;
1714
+ let offset = data_offset ( fake_ptr ) ;
1715
1715
set_data_ptr ( fake_ptr, ( ptr as * mut u8 ) . wrapping_offset ( offset) )
1716
1716
}
1717
1717
}
Original file line number Diff line number Diff line change @@ -1479,7 +1479,7 @@ impl<T> Weak<T> {
1479
1479
// because dangling weaks are only created for sized T. wrapping_offset
1480
1480
// is used so that we can use the same code path for dangling weak refs.
1481
1481
unsafe {
1482
- let offset = data_offset ( & raw const ( * ptr ) . data ) ;
1482
+ let offset = data_offset ( fake_ptr ) ;
1483
1483
set_data_ptr ( fake_ptr, ( ptr as * mut u8 ) . wrapping_offset ( offset) )
1484
1484
}
1485
1485
}
You can’t perform that action at this time.
0 commit comments