diff options
| author | bors <bors@rust-lang.org> | 2018-01-24 07:22:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-24 07:22:22 +0000 |
| commit | 9758ff9c0bd812135304385a48135a93372c3ec2 (patch) | |
| tree | b1c5abd61ff8946814219e643a8d98859eee5b25 /src/libstd | |
| parent | a538fe7ce715c7bd27e2e05329c3d857b9ad92af (diff) | |
| parent | f25f4687093c1c7e69a06fa7fa6cc3cc6f9aa9d1 (diff) | |
| download | rust-9758ff9c0bd812135304385a48135a93372c3ec2.tar.gz rust-9758ff9c0bd812135304385a48135a93372c3ec2.zip | |
Auto merge of #47299 - cramertj:unsafe-placer, r=alexcrichton
Make core::ops::Place an unsafe trait Consumers of `Place` would reasonably expect that the `pointer` function returns a valid pointer to memory that can actually be written to.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 4e5385c17e9..b01420f36a0 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1972,7 +1972,7 @@ impl<'a, K, V> Placer<V> for Entry<'a, K, V> { #[unstable(feature = "collection_placement", reason = "placement protocol is subject to change", issue = "30172")] -impl<'a, K, V> Place<V> for EntryPlace<'a, K, V> { +unsafe impl<'a, K, V> Place<V> for EntryPlace<'a, K, V> { fn pointer(&mut self) -> *mut V { self.bucket.read_mut().1 } |
