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:
parent
6750eb5a05
commit
dcbf4ec2a1
36 changed files with 78 additions and 33 deletions
|
|
@ -11,6 +11,8 @@
|
|||
#![crate_id="issue_2526#0.2"]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![feature(unsafe_destructor)]
|
||||
|
||||
struct arc_destruct<T> {
|
||||
_data: int,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue