about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-24 07:22:22 +0000
committerbors <bors@rust-lang.org>2018-01-24 07:22:22 +0000
commit9758ff9c0bd812135304385a48135a93372c3ec2 (patch)
treeb1c5abd61ff8946814219e643a8d98859eee5b25 /src/libstd
parenta538fe7ce715c7bd27e2e05329c3d857b9ad92af (diff)
parentf25f4687093c1c7e69a06fa7fa6cc3cc6f9aa9d1 (diff)
downloadrust-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.rs2
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
     }