diff options
| author | bors <bors@rust-lang.org> | 2015-10-10 00:39:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-10-10 00:39:29 +0000 |
| commit | 87cd2c08273dec5c8db8e59f4231b8e69aa9b85b (patch) | |
| tree | 24c7c70c06fbcd88be686bcf4e11d5ffc10aa27c /src/liballoc | |
| parent | 439311d9382abd5d22c9068f3f158d3b9ef6d1c9 (diff) | |
| parent | a445f234a64cdbbf946af012b94dccf91447b5ff (diff) | |
| download | rust-87cd2c08273dec5c8db8e59f4231b8e69aa9b85b.tar.gz rust-87cd2c08273dec5c8db8e59f4231b8e69aa9b85b.zip | |
Auto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1
implement RFC 1238: nonparametric dropck. cc #28498 cc @nikomatsakis
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/lib.rs | 5 | ||||
| -rw-r--r-- | src/liballoc/raw_vec.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index f66f1f13dcb..36989c2daad 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -550,6 +550,7 @@ impl<T: ?Sized> Drop for Arc<T> { /// /// } // implicit drop /// ``` + #[unsafe_destructor_blind_to_params] #[inline] fn drop(&mut self) { // This structure has #[unsafe_no_drop_flag], so this drop glue may run diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 98c729aaba4..8ecc78a231e 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -94,6 +94,11 @@ #![feature(unboxed_closures)] #![feature(unique)] #![feature(unsafe_no_drop_flag, filling_drop)] +// SNAP 1af31d4 +#![allow(unused_features)] +// SNAP 1af31d4 +#![allow(unused_attributes)] +#![feature(dropck_parametricity)] #![feature(unsize)] #![feature(core_slice_ext)] #![feature(core_str_ext)] diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index dd2db6fab08..49d37698154 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -445,6 +445,7 @@ impl<T> RawVec<T> { } impl<T> Drop for RawVec<T> { + #[unsafe_destructor_blind_to_params] /// Frees the memory owned by the RawVec *without* trying to Drop its contents. fn drop(&mut self) { let elem_size = mem::size_of::<T>(); diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 2f0bf1281b3..06d03161ca1 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -451,6 +451,7 @@ impl<T: ?Sized> Drop for Rc<T> { /// /// } // implicit drop /// ``` + #[unsafe_destructor_blind_to_params] fn drop(&mut self) { unsafe { let ptr = *self._ptr; |
