Feature-gate the #[unsafe_no_drop_flag] attribute.

See RFC 320, "Non-zeroing dynamic drops."

Fix #22173

[breaking-change]
This commit is contained in:
Felix S. Klock II 2015-02-11 13:57:40 +01:00
parent 0047f8bbd8
commit f9a1087f27
8 changed files with 24 additions and 2 deletions

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_no_drop_flag)]
#[unsafe_no_drop_flag]
pub struct ZeroLengthThingWithDestructor;
impl Drop for ZeroLengthThingWithDestructor {

View file

@ -9,6 +9,7 @@
// except according to those terms.
#![feature(unsafe_destructor)]
#![feature(unsafe_no_drop_flag)]
use std::mem::size_of;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_no_drop_flag)]
static mut drop_count: uint = 0;
#[unsafe_no_drop_flag]

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_no_drop_flag)]
static mut destructions : int = 3;
pub fn foo() {