From f0231f7c1bcc32d448fa1122beeb4f57a369c19d Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 25 Aug 2017 15:48:53 -0700 Subject: [PATCH] Kill dropck_eyepatch --- src/hash/table.rs | 5 ++++- src/lib.rs | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hash/table.rs b/src/hash/table.rs index a7439c1aa81..c22be2675ba 100644 --- a/src/hash/table.rs +++ b/src/hash/table.rs @@ -1163,7 +1163,10 @@ impl Clone for RawTable { } } -unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable { +// FORK NOTE: There may be lifetime errors that do not occur on std::HashMap +// since we removed the may_dangle (which allows more things to compile but has stricter guarantees). +// Generally we should be fine as long as no borrowed data is stuck into the map. +impl Drop for RawTable { fn drop(&mut self) { if self.capacity() == 0 { return; diff --git a/src/lib.rs b/src/lib.rs index 2fdcc42ebdc..d7ecfcf047c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,3 @@ -#![feature(generic_param_attrs)] -#![feature(dropck_eyepatch)] #![feature(allocator_api)] #![feature(alloc, shared, unique, fused, placement_new_protocol)]