mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Kill dropck_eyepatch
This commit is contained in:
parent
db840f5227
commit
f0231f7c1b
2 changed files with 4 additions and 3 deletions
|
@ -1163,7 +1163,10 @@ impl<K: Clone, V: Clone> Clone for RawTable<K, V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable<K, V> {
|
// 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<K, V> Drop for RawTable<K, V> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
if self.capacity() == 0 {
|
if self.capacity() == 0 {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![feature(generic_param_attrs)]
|
|
||||||
#![feature(dropck_eyepatch)]
|
|
||||||
#![feature(allocator_api)]
|
#![feature(allocator_api)]
|
||||||
#![feature(alloc, shared, unique, fused, placement_new_protocol)]
|
#![feature(alloc, shared, unique, fused, placement_new_protocol)]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue