nodrop: Remove the no_drop_flag crate feature

This unstable feature is not supported in nightly anymore (and nor is it
meaningful).
This commit is contained in:
bluss
2016-08-25 16:06:26 +02:00
parent a41ecc0a29
commit af8f6b5d6e
2 changed files with 0 additions and 14 deletions
-10
View File
@@ -9,16 +9,8 @@
//! - Optional
//! - Requires nightly channel.
//! - Use `needs_drop` to skip overwriting if not necessary
//! - `no_drop_flag`.
//! - Optional.
//! - Requires nightly channel.
//! - Use no drop flag on the **NoDrop** type,
//! which means less space overhead. Use with care and report a bug if anything
//! changes behavior with this feature.
//!
//!
#![cfg_attr(feature="no_drop_flag", feature(unsafe_no_drop_flag))]
#![cfg_attr(feature="use_needs_drop", feature(core_intrinsics))]
#![cfg_attr(not(any(test, feature="std")), no_std)]
@@ -41,7 +33,6 @@ enum Flag<T> {
}
/// A type holding **T** that will not call its destructor on drop
#[cfg_attr(feature="no_drop_flag", unsafe_no_drop_flag)]
pub struct NoDrop<T>(Flag<T>);
impl<T> NoDrop<T> {
@@ -82,7 +73,6 @@ fn needs_drop<T>() -> bool {
impl<T> Drop for NoDrop<T> {
fn drop(&mut self) {
if needs_drop::<T>() {
// no drop flag info: writing repeatedly is idempotent
// inhibit drop
unsafe {
ptr::write(&mut self.0, Flag::Dropped);