diff options
Diffstat (limited to 'src/test')
36 files changed, 7 insertions, 153 deletions
diff --git a/src/test/auxiliary/issue-2526.rs b/src/test/auxiliary/issue-2526.rs index e85a0a90aff..e57c6dc7184 100644 --- a/src/test/auxiliary/issue-2526.rs +++ b/src/test/auxiliary/issue-2526.rs @@ -11,8 +11,6 @@ #![crate_name="issue_2526"] #![crate_type = "lib"] -#![feature(unsafe_destructor)] - use std::marker; struct arc_destruct<T: Sync> { @@ -20,7 +18,6 @@ struct arc_destruct<T: Sync> { _marker: marker::PhantomData<T> } -#[unsafe_destructor] impl<T: Sync> Drop for arc_destruct<T> { fn drop(&mut self) {} } diff --git a/src/test/bench/task-perf-alloc-unwind.rs b/src/test/bench/task-perf-alloc-unwind.rs index 9eba2c36390..e091dbfb00e 100644 --- a/src/test/bench/task-perf-alloc-unwind.rs +++ b/src/test/bench/task-perf-alloc-unwind.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor, box_syntax, std_misc, collections)] +#![feature(box_syntax, std_misc, collections)] use std::env; use std::thread; @@ -54,7 +54,6 @@ struct r { _l: Box<nillist>, } -#[unsafe_destructor] impl Drop for r { fn drop(&mut self) {} } diff --git a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs index 99ac8672269..309e286f48e 100644 --- a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs +++ b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs @@ -8,13 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - struct defer<'a> { x: &'a [&'a str], } -#[unsafe_destructor] impl<'a> Drop for defer<'a> { fn drop(&mut self) { unsafe { diff --git a/src/test/compile-fail/dropck_arr_cycle_checked.rs b/src/test/compile-fail/dropck_arr_cycle_checked.rs index 40d992fe21f..f3c3f31e4af 100644 --- a/src/test/compile-fail/dropck_arr_cycle_checked.rs +++ b/src/test/compile-fail/dropck_arr_cycle_checked.rs @@ -13,8 +13,6 @@ // // (Compare against compile-fail/dropck_vec_cycle_checked.rs) -#![feature(unsafe_destructor)] - use std::cell::Cell; use id::Id; @@ -69,7 +67,6 @@ struct CheckId<T:HasId> { #[allow(non_snake_case)] fn CheckId<T:HasId>(t: T) -> CheckId<T> { CheckId{ v: t } } -#[unsafe_destructor] impl<T:HasId> Drop for CheckId<T> { fn drop(&mut self) { assert!(self.v.count() > 0); diff --git a/src/test/compile-fail/dropck_direct_cycle_with_drop.rs b/src/test/compile-fail/dropck_direct_cycle_with_drop.rs index b9df71322ad..5db23721259 100644 --- a/src/test/compile-fail/dropck_direct_cycle_with_drop.rs +++ b/src/test/compile-fail/dropck_direct_cycle_with_drop.rs @@ -23,8 +23,6 @@ // `'a` in `&'a D<'a>` cannot be satisfied when `D<'a>` implements // `Drop`.) -#![feature(unsafe_destructor)] - use std::cell::Cell; struct D<'a> { @@ -36,7 +34,6 @@ impl<'a> D<'a> { fn new(name: String) -> D<'a> { D { name: name, p: Cell::new(None) } } } -#[unsafe_destructor] impl<'a> Drop for D<'a> { fn drop(&mut self) { println!("dropping {} whose sibling is {:?}", diff --git a/src/test/compile-fail/dropck_tarena_cycle_checked.rs b/src/test/compile-fail/dropck_tarena_cycle_checked.rs index 9488882ca94..10bfe70640c 100644 --- a/src/test/compile-fail/dropck_tarena_cycle_checked.rs +++ b/src/test/compile-fail/dropck_tarena_cycle_checked.rs @@ -17,7 +17,6 @@ // for the error message we see here.) #![allow(unstable)] -#![feature(unsafe_destructor)] extern crate arena; @@ -76,7 +75,6 @@ struct CheckId<T:HasId> { #[allow(non_snake_case)] fn CheckId<T:HasId>(t: T) -> CheckId<T> { CheckId{ v: t } } -#[unsafe_destructor] impl<T:HasId> Drop for CheckId<T> { fn drop(&mut self) { assert!(self.v.count() > 0); diff --git a/src/test/compile-fail/dropck_tarena_unsound_drop.rs b/src/test/compile-fail/dropck_tarena_unsound_drop.rs index 64d77e97fa7..7a204e6143e 100644 --- a/src/test/compile-fail/dropck_tarena_unsound_drop.rs +++ b/src/test/compile-fail/dropck_tarena_unsound_drop.rs @@ -20,7 +20,6 @@ // this was reduced to better understand its error message.) #![allow(unstable)] -#![feature(unsafe_destructor)] extern crate arena; @@ -35,7 +34,6 @@ struct CheckId<T:HasId> { v: T } // interface to CheckId does not (and cannot) know that, and therefore // when encountering the a value V of type CheckId<S>, we must // conservatively force the type S to strictly outlive V. -#[unsafe_destructor] impl<T:HasId> Drop for CheckId<T> { fn drop(&mut self) { assert!(self.v.count() > 0); diff --git a/src/test/compile-fail/dropck_vec_cycle_checked.rs b/src/test/compile-fail/dropck_vec_cycle_checked.rs index 9d92552244f..53a14fd8fac 100644 --- a/src/test/compile-fail/dropck_vec_cycle_checked.rs +++ b/src/test/compile-fail/dropck_vec_cycle_checked.rs @@ -12,8 +12,6 @@ // // (Compare against compile-fail/dropck_arr_cycle_checked.rs) -#![feature(unsafe_destructor)] - use std::cell::Cell; use id::Id; @@ -68,7 +66,6 @@ struct CheckId<T:HasId> { #[allow(non_snake_case)] fn CheckId<T:HasId>(t: T) -> CheckId<T> { CheckId{ v: t } } -#[unsafe_destructor] impl<T:HasId> Drop for CheckId<T> { fn drop(&mut self) { assert!(self.v.count() > 0); diff --git a/src/test/compile-fail/exclusive-drop-and-copy.rs b/src/test/compile-fail/exclusive-drop-and-copy.rs index 460c396750f..b4cb2469659 100644 --- a/src/test/compile-fail/exclusive-drop-and-copy.rs +++ b/src/test/compile-fail/exclusive-drop-and-copy.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - // issue #20126 #[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented @@ -22,7 +20,6 @@ impl Drop for Foo { #[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented struct Bar<T>(::std::marker::PhantomData<T>); -#[unsafe_destructor] impl<T> Drop for Bar<T> { fn drop(&mut self) {} } diff --git a/src/test/compile-fail/gated-unsafe-destructor.rs b/src/test/compile-fail/gated-unsafe-destructor.rs deleted file mode 100644 index 9dd1e229e0a..00000000000 --- a/src/test/compile-fail/gated-unsafe-destructor.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Test that `#[unsafe_destructor]` attribute is gated by `unsafe_destructor` -// feature gate. -// -// (This test can be removed entirely when we remove the -// `unsafe_destructor` feature itself.) - -struct D<'a>(&'a u32); - -#[unsafe_destructor] -//~^ ERROR `#[unsafe_destructor]` does nothing anymore -impl<'a> Drop for D<'a> { - fn drop(&mut self) { } -} - -pub fn main() { } diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 5ebc386109a..b80d15bb6f3 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - use std::thread; use std::rc::Rc; @@ -22,8 +20,7 @@ fn main() { _x: Port<()>, } - #[unsafe_destructor] - impl Drop for foo { + impl Drop for foo { fn drop(&mut self) {} } diff --git a/src/test/compile-fail/reject-specialized-drops-8142.rs b/src/test/compile-fail/reject-specialized-drops-8142.rs index 30264c9f218..1e189528f18 100644 --- a/src/test/compile-fail/reject-specialized-drops-8142.rs +++ b/src/test/compile-fail/reject-specialized-drops-8142.rs @@ -11,8 +11,6 @@ // Issue 8142: Test that Drop impls cannot be specialized beyond the // predicates attached to the struct/enum definition itself. -#![feature(unsafe_destructor)] - trait Bound { fn foo(&self) { } } struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } @@ -28,51 +26,39 @@ struct U; struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb } struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } -#[unsafe_destructor] impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. fn drop(&mut self) { } } -#[unsafe_destructor] impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. fn drop(&mut self) { } } -#[unsafe_destructor] impl<'ml> Drop for M<'ml> { fn drop(&mut self) { } } // ACCEPT -#[unsafe_destructor] impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT //~^ ERROR Implementations of Drop cannot be specialized -#[unsafe_destructor] impl<Cok_nobound> Drop for O<Cok_nobound> { fn drop(&mut self) { } } // ACCEPT -#[unsafe_destructor] impl Drop for P<i8> { fn drop(&mut self) { } } // REJECT //~^ ERROR Implementations of Drop cannot be specialized -#[unsafe_destructor] impl<Adds_bnd:Bound> Drop for Q<Adds_bnd> { fn drop(&mut self) { } } // REJECT //~^ ERROR The requirement `Adds_bnd : Bound` is added only by the Drop impl. -#[unsafe_destructor] impl<'rbnd,Adds_rbnd:'rbnd> Drop for R<Adds_rbnd> { fn drop(&mut self) { } } // REJECT //~^ ERROR The requirement `Adds_rbnd : 'rbnd` is added only by the Drop impl. -#[unsafe_destructor] impl<Bs:Bound> Drop for S<Bs> { fn drop(&mut self) { } } // ACCEPT -#[unsafe_destructor] impl<'t,Bt:'t> Drop for T<'t,Bt> { fn drop(&mut self) { } } // ACCEPT impl Drop for U { fn drop(&mut self) { } } // ACCEPT -#[unsafe_destructor] impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJECT //~^ERROR Implementations of Drop cannot be specialized -#[unsafe_destructor] impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT //~^ERROR Implementations of Drop cannot be specialized diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index 938abbf2c20..6aa0834cb27 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - use std::cell::Cell; #[derive(Debug)] @@ -17,7 +15,6 @@ struct r<'a> { i: &'a Cell<isize>, } -#[unsafe_destructor] impl<'a> Drop for r<'a> { fn drop(&mut self) { unsafe { diff --git a/src/test/compile-fail/vec-must-not-hide-type-from-dropck.rs b/src/test/compile-fail/vec-must-not-hide-type-from-dropck.rs index 44a3f716e3e..c30aa7b817b 100644 --- a/src/test/compile-fail/vec-must-not-hide-type-from-dropck.rs +++ b/src/test/compile-fail/vec-must-not-hide-type-from-dropck.rs @@ -23,8 +23,6 @@ // conditions above to be satisfied, meaning that if the dropck is // sound, it should reject this code. -#![feature(unsafe_destructor)] - use std::cell::Cell; use id::Id; @@ -91,7 +89,6 @@ struct CheckId<T:HasId> { #[allow(non_snake_case)] fn CheckId<T:HasId>(t: T) -> CheckId<T> { CheckId{ v: t } } -#[unsafe_destructor] impl<T:HasId> Drop for CheckId<T> { fn drop(&mut self) { assert!(self.v.count() > 0); diff --git a/src/test/run-pass/attr-no-drop-flag-size.rs b/src/test/run-pass/attr-no-drop-flag-size.rs index 893fb85b529..0c464c9bad7 100644 --- a/src/test/run-pass/attr-no-drop-flag-size.rs +++ b/src/test/run-pass/attr-no-drop-flag-size.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] #![feature(unsafe_no_drop_flag)] use std::mem::size_of; @@ -19,7 +17,6 @@ struct Test<T> { a: T } -#[unsafe_destructor] impl<T> Drop for Test<T> { fn drop(&mut self) { } } diff --git a/src/test/run-pass/drop-trait-generic.rs b/src/test/run-pass/drop-trait-generic.rs index 4ba3aa70dfc..e55eae1e74f 100644 --- a/src/test/run-pass/drop-trait-generic.rs +++ b/src/test/run-pass/drop-trait-generic.rs @@ -8,13 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - struct S<T> { x: T } -#[unsafe_destructor] impl<T> ::std::ops::Drop for S<T> { fn drop(&mut self) { println!("bye"); diff --git a/src/test/run-pass/dropck_tarena_sound_drop.rs b/src/test/run-pass/dropck_tarena_sound_drop.rs index 6ccf6c2fd64..b0c4f4ca272 100644 --- a/src/test/run-pass/dropck_tarena_sound_drop.rs +++ b/src/test/run-pass/dropck_tarena_sound_drop.rs @@ -16,9 +16,8 @@ // shows a similar setup, but restricts `f` so that the struct `C<'a>` // is force-fed a lifetime equal to that of the borrowed arena. - #![allow(unstable)] -#![feature(unsafe_destructor, rustc_private)] +#![feature(rustc_private)] extern crate arena; @@ -33,7 +32,6 @@ struct CheckId<T:HasId> { v: T } // interface to CheckId does not (and cannot) know that, and therefore // when encountering the a value V of type CheckId<S>, we must // conservatively force the type S to strictly outlive V. -#[unsafe_destructor] impl<T:HasId> Drop for CheckId<T> { fn drop(&mut self) { assert!(self.v.count() > 0); diff --git a/src/test/run-pass/init-res-into-things.rs b/src/test/run-pass/init-res-into-things.rs index 97b32189d00..a270b003981 100644 --- a/src/test/run-pass/init-res-into-things.rs +++ b/src/test/run-pass/init-res-into-things.rs @@ -8,10 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![allow(unknown_features)] #![feature(box_syntax)] -#![feature(unsafe_destructor)] use std::cell::Cell; @@ -24,7 +21,6 @@ struct r<'a> { struct BoxR<'a> { x: r<'a> } -#[unsafe_destructor] impl<'a> Drop for r<'a> { fn drop(&mut self) { self.i.set(self.i.get() + 1) diff --git a/src/test/run-pass/issue-15858.rs b/src/test/run-pass/issue-15858.rs index 4f084d7891f..a1ada18984e 100644 --- a/src/test/run-pass/issue-15858.rs +++ b/src/test/run-pass/issue-15858.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - static mut DROP_RAN: bool = false; trait Bar { @@ -26,7 +23,6 @@ impl Bar for BarImpl { struct Foo<B: Bar>(B); -#[unsafe_destructor] impl<B: Bar> Drop for Foo<B> { fn drop(&mut self) { unsafe { diff --git a/src/test/run-pass/issue-15924.rs b/src/test/run-pass/issue-15924.rs index e544585745d..0c208773884 100644 --- a/src/test/run-pass/issue-15924.rs +++ b/src/test/run-pass/issue-15924.rs @@ -10,7 +10,7 @@ // pretty-expanded FIXME #23616 -#![feature(unsafe_destructor, rustc_private)] +#![feature(rustc_private)] extern crate serialize; @@ -22,7 +22,6 @@ struct Foo<T: Encodable> { v: T, } -#[unsafe_destructor] impl<T: Encodable> Drop for Foo<T> { fn drop(&mut self) { json::encode(&self.v); diff --git a/src/test/run-pass/issue-16492.rs b/src/test/run-pass/issue-16492.rs index fcb04627662..975557726ce 100644 --- a/src/test/run-pass/issue-16492.rs +++ b/src/test/run-pass/issue-16492.rs @@ -10,8 +10,6 @@ // ignore-pretty -#![feature(unsafe_destructor)] - use std::rc::Rc; use std::cell::Cell; @@ -29,7 +27,6 @@ impl Field { } } -#[unsafe_destructor] // because Field isn't Send impl Drop for Field { fn drop(&mut self) { println!("Dropping field {}", self.number); @@ -50,7 +47,6 @@ struct HasDropImpl { _three: Field } -#[unsafe_destructor] // because HasDropImpl isn't Send impl Drop for HasDropImpl { fn drop(&mut self) { println!("HasDropImpl.drop()"); diff --git a/src/test/run-pass/issue-17216.rs b/src/test/run-pass/issue-17216.rs index 6a8f7d992a2..e713bbf127d 100644 --- a/src/test/run-pass/issue-17216.rs +++ b/src/test/run-pass/issue-17216.rs @@ -8,14 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - struct Leak<'a> { dropped: &'a mut bool } -#[unsafe_destructor] impl<'a> Drop for Leak<'a> { fn drop(&mut self) { *self.dropped = true; diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 0df89c72424..a0f18d9f7f1 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -9,7 +9,7 @@ // except according to those terms. // -#![feature(unsafe_destructor, std_misc)] +#![feature(std_misc)] pub type Task = isize; @@ -165,8 +165,7 @@ pub mod pipes { p: Option<*const packet<T>>, } - #[unsafe_destructor] - impl<T:Send> Drop for send_packet<T> { + impl<T:Send> Drop for send_packet<T> { fn drop(&mut self) { unsafe { if self.p != None { @@ -195,8 +194,7 @@ pub mod pipes { p: Option<*const packet<T>>, } - #[unsafe_destructor] - impl<T:Send> Drop for recv_packet<T> { + impl<T:Send> Drop for recv_packet<T> { fn drop(&mut self) { unsafe { if self.p != None { diff --git a/src/test/run-pass/issue-2735-2.rs b/src/test/run-pass/issue-2735-2.rs index 36d7f4583b0..cdce059ae71 100644 --- a/src/test/run-pass/issue-2735-2.rs +++ b/src/test/run-pass/issue-2735-2.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - use std::cell::Cell; // This test should behave exactly like issue-2735-3 @@ -18,7 +15,6 @@ struct defer<'a> { b: &'a Cell<bool>, } -#[unsafe_destructor] impl<'a> Drop for defer<'a> { fn drop(&mut self) { self.b.set(true); diff --git a/src/test/run-pass/issue-2735-3.rs b/src/test/run-pass/issue-2735-3.rs index f438519b72f..d1e28faba8b 100644 --- a/src/test/run-pass/issue-2735-3.rs +++ b/src/test/run-pass/issue-2735-3.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - use std::cell::Cell; // This test should behave exactly like issue-2735-2 @@ -18,7 +15,6 @@ struct defer<'a> { b: &'a Cell<bool>, } -#[unsafe_destructor] impl<'a> Drop for defer<'a> { fn drop(&mut self) { self.b.set(true); diff --git a/src/test/run-pass/issue-4252.rs b/src/test/run-pass/issue-4252.rs index 73ef35f0457..e604141dab8 100644 --- a/src/test/run-pass/issue-4252.rs +++ b/src/test/run-pass/issue-4252.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - trait X { fn call<T: std::fmt::Debug>(&self, x: &T); fn default_method<T: std::fmt::Debug>(&self, x: &T) { @@ -31,7 +29,6 @@ impl X for Y { } } -#[unsafe_destructor] impl<T: X + std::fmt::Debug> Drop for Z<T> { fn drop(&mut self) { // These statements used to cause an ICE. diff --git a/src/test/run-pass/issue-979.rs b/src/test/run-pass/issue-979.rs index 979abcef7b8..43fa9812426 100644 --- a/src/test/run-pass/issue-979.rs +++ b/src/test/run-pass/issue-979.rs @@ -8,16 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - use std::cell::Cell; struct r<'a> { b: &'a Cell<isize>, } -#[unsafe_destructor] impl<'a> Drop for r<'a> { fn drop(&mut self) { self.b.set(self.b.get() + 1); diff --git a/src/test/run-pass/newtype-struct-drop-run.rs b/src/test/run-pass/newtype-struct-drop-run.rs index 4407002aca8..6a5d86b522e 100644 --- a/src/test/run-pass/newtype-struct-drop-run.rs +++ b/src/test/run-pass/newtype-struct-drop-run.rs @@ -8,16 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - // Make sure the destructor is run for newtype structs. use std::cell::Cell; struct Foo<'a>(&'a Cell<isize>); -#[unsafe_destructor] impl<'a> Drop for Foo<'a> { fn drop(&mut self) { let Foo(i) = *self; diff --git a/src/test/run-pass/option-unwrap.rs b/src/test/run-pass/option-unwrap.rs index 44f13a3eb1a..e22edb3caed 100644 --- a/src/test/run-pass/option-unwrap.rs +++ b/src/test/run-pass/option-unwrap.rs @@ -8,16 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - use std::cell::Cell; struct dtor<'a> { x: &'a Cell<isize>, } -#[unsafe_destructor] impl<'a> Drop for dtor<'a> { fn drop(&mut self) { self.x.set(self.x.get() - 1); diff --git a/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs b/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs index 6cc32301cc4..cdb58d1ba4c 100644 --- a/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs +++ b/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs @@ -10,8 +10,6 @@ // pretty-expanded FIXME #23616 -#![feature(unsafe_destructor)] - use std::marker; pub struct Foo<T>(marker::PhantomData<T>); @@ -24,7 +22,6 @@ impl<T> Iterator for Foo<T> { } } -#[unsafe_destructor] impl<T> Drop for Foo<T> { fn drop(&mut self) { self.next(); diff --git a/src/test/run-pass/resource-assign-is-not-copy.rs b/src/test/run-pass/resource-assign-is-not-copy.rs index ba63c2db7cf..4d0c2900a0f 100644 --- a/src/test/run-pass/resource-assign-is-not-copy.rs +++ b/src/test/run-pass/resource-assign-is-not-copy.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - use std::cell::Cell; #[derive(Debug)] @@ -17,7 +15,6 @@ struct r<'a> { i: &'a Cell<isize>, } -#[unsafe_destructor] impl<'a> Drop for r<'a> { fn drop(&mut self) { self.i.set(self.i.get() + 1); diff --git a/src/test/run-pass/resource-destruct.rs b/src/test/run-pass/resource-destruct.rs index 229ceba08b0..5b2b8655442 100644 --- a/src/test/run-pass/resource-destruct.rs +++ b/src/test/run-pass/resource-destruct.rs @@ -8,15 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] - use std::cell::Cell; struct shrinky_pointer<'a> { i: &'a Cell<isize>, } -#[unsafe_destructor] impl<'a> Drop for shrinky_pointer<'a> { fn drop(&mut self) { println!("Hello!"); self.i.set(self.i.get() - 1); diff --git a/src/test/run-pass/resource-in-struct.rs b/src/test/run-pass/resource-in-struct.rs index c1e1ff0658b..2914127246a 100644 --- a/src/test/run-pass/resource-in-struct.rs +++ b/src/test/run-pass/resource-in-struct.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - // Ensures that class dtors run if the object is inside an enum // variant @@ -23,7 +20,6 @@ struct close_res<'a> { } -#[unsafe_destructor] impl<'a> Drop for close_res<'a> { fn drop(&mut self) { self.i.set(false); diff --git a/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs b/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs index dcda724c7b8..449f533103a 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - // Test that we are able to infer a suitable kind for this `move` // closure that is just called (`FnOnce`). @@ -18,7 +15,6 @@ use std::mem; struct DropMe<'a>(&'a mut i32); -#[unsafe_destructor] impl<'a> Drop for DropMe<'a> { fn drop(&mut self) { *self.0 += 1; diff --git a/src/test/run-pass/unboxed-closures-infer-fnonce.rs b/src/test/run-pass/unboxed-closures-infer-fnonce.rs index 275ba0520c5..79a1aff8535 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnonce.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnonce.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - // Test that we are able to infer a suitable kind for this closure // that is just called (`FnOnce`). @@ -18,7 +15,6 @@ use std::mem; struct DropMe<'a>(&'a mut i32); -#[unsafe_destructor] impl<'a> Drop for DropMe<'a> { fn drop(&mut self) { *self.0 += 1; diff --git a/src/test/run-pass/vec-slice-drop.rs b/src/test/run-pass/vec-slice-drop.rs index f400869682f..86d34d38f74 100644 --- a/src/test/run-pass/vec-slice-drop.rs +++ b/src/test/run-pass/vec-slice-drop.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unsafe_destructor)] - use std::cell::Cell; // Make sure that destructors get run on slice literals @@ -18,7 +15,6 @@ struct foo<'a> { x: &'a Cell<isize>, } -#[unsafe_destructor] impl<'a> Drop for foo<'a> { fn drop(&mut self) { self.x.set(self.x.get() + 1); |
