diff options
| author | bors <bors@rust-lang.org> | 2018-06-12 00:36:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-06-12 00:36:21 +0000 |
| commit | 4367e41ea2a105c373de27c2f080fc2527cc6927 (patch) | |
| tree | 9ca30ec2dbf3311f0a0d0d6275d5abca8f23fc1f /src/libstd/collections | |
| parent | f9944fde377b8b2575f96fff60f784eddce54002 (diff) | |
| parent | 7f0d54d98842c786ab7a140c17c3ea32aea6aead (diff) | |
| download | rust-4367e41ea2a105c373de27c2f080fc2527cc6927.tar.gz rust-4367e41ea2a105c373de27c2f080fc2527cc6927.zip | |
Auto merge of #51241 - glandium:globalalloc, r=sfackler,SimonSapin
Stabilize GlobalAlloc and #[global_allocator] This PR implements the changes discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-393263510 Fixes #49668 Fixes #27389 This does not change the default global allocator: #36963
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/table.rs | 2 | ||||
| -rw-r--r-- | src/libstd/collections/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index d997fb28d42..55f9f4f7cfe 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -1124,7 +1124,7 @@ unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable<K, V> { let (layout, _) = calculate_layout::<K, V>(self.capacity()) .unwrap_or_else(|_| unsafe { hint::unreachable_unchecked() }); unsafe { - Global.dealloc(NonNull::new_unchecked(self.hashes.ptr()).as_opaque(), layout); + Global.dealloc(NonNull::new_unchecked(self.hashes.ptr()).cast(), layout); // Remember how everything was allocated out of one buffer // during initialization? We only need one call to free here. } diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs index d8e79b97970..42113414183 100644 --- a/src/libstd/collections/mod.rs +++ b/src/libstd/collections/mod.rs @@ -438,7 +438,7 @@ pub use self::hash_map::HashMap; pub use self::hash_set::HashSet; #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] -pub use heap::CollectionAllocErr; +pub use alloc::CollectionAllocErr; mod hash; |
