librustc: Put #[unsafe_destructor] behind a feature gate.

Closes #8142.

This is not the semantics we want long-term. You can continue to use
`#[unsafe_destructor]`, but you'll need to add
`#![feature(unsafe_destructor)]` to the crate attributes.

[breaking-change]
This commit is contained in:
Patrick Walton 2014-06-17 16:00:04 -07:00
parent 6750eb5a05
commit dcbf4ec2a1
36 changed files with 78 additions and 33 deletions

View file

@ -11,6 +11,8 @@
#![crate_id="issue_2526#0.2"]
#![crate_type = "lib"]
#![feature(unsafe_destructor)]
struct arc_destruct<T> {
_data: int,
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
extern crate collections;
extern crate time;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_destructor)]
extern crate debug;
struct defer<'a> {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
extern crate debug;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
extern crate debug;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
extern crate debug;
use std::cell::Cell;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
// error-pattern:quux

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_destructor)]
use std::mem::size_of;
#[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_destructor)]
struct S<T> {
x: T
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{Gc, GC};

View file

@ -9,6 +9,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_destructor)]
pub type Task = int;
// tjc: I don't know why

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{Gc, GC};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{Gc, GC};

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unsafe_destructor)]
extern crate debug;
trait X {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{GC, Gc};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
// Make sure the destructor is run for newtype structs.

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{GC, Gc};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
extern crate debug;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{GC, Gc};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
// Ensures that class dtors run if the object is inside an enum
// variant

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::task;
use std::gc::{Gc, GC};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)]
#![feature(managed_boxes, unsafe_destructor)]
use std::cell::Cell;
use std::gc::{Gc, GC};