Skip to content

Commit

Permalink
Another addr_of_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
steffahn committed Oct 4, 2021
1 parent 639a52b commit 563bd44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unsafe_self_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl<Owner, Dependent> Drop for OwnerAndCellDropGuard<Owner, Dependent> {
// We must only drop owner and the struct itself,
// The whole point of this drop guard is to clean up the partially
// initialized struct should building the dependent fail.
drop_in_place(&mut (*self.joined_ptr.as_ptr()).owner);
drop_in_place(addr_of_mut!((*self.joined_ptr.as_ptr()).owner));

let layout = Layout::new::<JoinedCell<Owner, Dependent>>();
let joined_void_ptr =
Expand Down

0 comments on commit 563bd44

Please sign in to comment.