diff options
| author | bors <bors@rust-lang.org> | 2020-12-30 21:25:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-30 21:25:15 +0000 |
| commit | 9775ffef2a4c3a36cadb58b72ea60cefb92c86ae (patch) | |
| tree | 3cd62fcea1d36df812c14eec010c884c466deb8b /library/alloc/src/sync.rs | |
| parent | e2267046859c9ceb932abc983561d53a117089f6 (diff) | |
| parent | 8998e31223333cdcf384cf39876d7c4bb533db48 (diff) | |
| download | rust-9775ffef2a4c3a36cadb58b72ea60cefb92c86ae.tar.gz rust-9775ffef2a4c3a36cadb58b72ea60cefb92c86ae.zip | |
Auto merge of #80530 - m-ou-se:rollup-zit69ko, r=m-ou-se
Rollup of 9 pull requests Successful merges: - #78934 (refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength) - #79479 (Add `Iterator::intersperse`) - #80128 (Edit rustc_ast::ast::FieldPat docs) - #80424 (Don't give an error when creating a file for the first time) - #80458 (Some Promotion Refactoring) - #80488 (Do not create dangling &T in Weak<T>::drop) - #80491 (Miri: make size/align_of_val work for dangling raw ptrs) - #80495 (Rename kw::Invalid -> kw::Empty) - #80513 (Add regression test for #80062) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/sync.rs')
| -rw-r--r-- | library/alloc/src/sync.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 7c03345aba5..85c0a9f0857 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1927,7 +1927,7 @@ impl<T: ?Sized> Drop for Weak<T> { if inner.weak.fetch_sub(1, Release) == 1 { acquire!(inner.weak); - unsafe { Global.deallocate(self.ptr.cast(), Layout::for_value(self.ptr.as_ref())) } + unsafe { Global.deallocate(self.ptr.cast(), Layout::for_value_raw(self.ptr.as_ptr())) } } } } |
