#[unsafe_destructor]
impl<T: Send> Drop for Unique<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment];
#[inline(never)];
}
impl Drop for TimeBomb {
- fn drop(&self) {
+ fn drop(&mut self) {
for _ in range(0, self.explosivity) {
println("blam!");
}
}
impl Drop for PoisonOnFail {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
/* assert!(!*self.failed);
-- might be false in case of cond.wait() */
#[unsafe_destructor]
impl Drop for Arena {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
destroy_chunk(&self.head);
do self.chunks.each |chunk| {
#[unsafe_destructor]
impl Drop for DtorRes {
- fn drop(&self) {
+ fn drop(&mut self) {
match self.dtor {
option::None => (),
option::Some(f) => f()
#[unsafe_destructor]
impl<T> Drop for DList<T> {
- fn drop(&self) {
- let mut_self = unsafe {
- cast::transmute_mut(self)
- };
+ fn drop(&mut self) {
// Dissolve the dlist in backwards direction
// Just dropping the list_head can lead to stack exhaustion
// when length is >> 1_000_000
- let mut tail = mut_self.list_tail;
+ let mut tail = self.list_tail;
loop {
match tail.resolve() {
None => break,
}
}
}
- mut_self.length = 0;
- mut_self.list_head = None;
- mut_self.list_tail = Rawlink::none();
+ self.length = 0;
+ self.list_head = None;
+ self.list_tail = Rawlink::none();
}
}
// over ~fn's that have pipes and so forth within!
#[unsafe_destructor]
impl<A> Drop for Future<A> {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
enum FutureState<A> {
#[unsafe_destructor]
impl<T> Drop for Rc<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
if self.ptr.is_not_null() {
(*self.ptr).count -= 1;
#[unsafe_destructor]
impl<T> Drop for RcMut<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
if self.ptr.is_not_null() {
(*self.ptr).count -= 1;
#[unsafe_destructor]
impl<T> Drop for TaskPool<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
for channel in self.channels.iter() {
channel.send(Quit);
}
// FIXME #4330: use &mut self here
#[unsafe_destructor]
impl Drop for Database {
- fn drop(&self) {
+ fn drop(&mut self) {
if self.db_dirty {
self.save();
}
impl Engine for LLVMJITData {}
impl Drop for LLVMJITData {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
llvm::LLVMDisposeExecutionEngine(self.ee);
llvm::LLVMContextDispose(self.llcx);
}
impl Drop for target_data_res {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
llvm::LLVMDisposeTargetData(self.TD);
}
}
impl Drop for pass_manager_res {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
llvm::LLVMDisposePassManager(self.PM);
}
}
impl Drop for object_file_res {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
llvm::LLVMDisposeObjectFile(self.ObjectFile);
}
}
impl Drop for section_iter_res {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
llvm::LLVMDisposeSectionIterator(self.SI);
}
#[unsafe_destructor]
impl Drop for _InsnCtxt {
- fn drop(&self) {
+ fn drop(&mut self) {
do local_data::modify(task_local_insn_key) |c| {
do c.map_move |ctx| {
let mut ctx = (*ctx).clone();
#[unsafe_destructor]
impl<'self> Drop for StatRecorder<'self> {
- fn drop(&self) {
+ fn drop(&mut self) {
if self.ccx.sess.trans_stats() {
let end = time::precise_time_ns();
let elapsed = ((end - self.start) / 1_000_000) as uint;
}
impl Drop for BuilderRef_res {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
llvm::LLVMDisposeBuilder(self.B);
}
#[unsafe_destructor]
impl Drop for CrateContext {
- fn drop(&self) {
+ fn drop(&mut self) {
unset_task_llcx();
}
}
}
impl Drop for finally {
- fn drop(&self) { self.ch.send(done); }
+ fn drop(&mut self) { self.ch.send(done); }
}
let _finally = finally { ch: ch };
}
impl Drop for _indenter {
- fn drop(&self) { debug!("<<"); }
+ fn drop(&mut self) { debug!("<<"); }
}
pub fn _indenter(_i: ()) -> _indenter {
}
impl Drop for Bored {
- fn drop(&self) { }
+ fn drop(&mut self) { }
}
/**
}
impl Drop for CString {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
if self.owns_buffer_ {
unsafe {
#[unsafe_destructor]
impl<'self, T, U> Drop for Guard<'self, T, U> {
- fn drop(&self) {
+ fn drop(&mut self) {
debug!("Guard: popping handler from TLS");
let curr = local_data::pop(self.cond.key);
match curr {
}
impl Drop for FILERes {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
unsafe {
}
impl Drop for FdRes {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
unsafe {
#[unsafe_destructor]
impl<T> Drop for Res<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
match self.arg.opt_level {
None => (),
Some(level) => {
#[lang="drop"]
pub trait Drop {
- fn drop(&self);
+ fn drop(&mut self);
}
#[lang="add"]
}
impl Drop for HasDtor {
- fn drop(&self) {
+ fn drop(&mut self) {
}
}
HasDtor { x : 10 };
}
}
-}
\ No newline at end of file
+}
#[unsafe_destructor]
impl ::ops::Drop for R {
- fn drop(&self) { *(self.i) += 1; }
+ fn drop(&mut self) { *(self.i) += 1; }
}
fn R(i: @mut int) -> R {
#[cfg(unix)]
impl Drop for MemoryMap {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
unsafe {
#[cfg(windows)]
impl Drop for MemoryMap {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
use libc::types::os::arch::extra::{LPCVOID, HANDLE};
#[unsafe_destructor]
impl<T> Drop for ChanOne<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
if self.suppress_finalize { return }
unsafe {
#[unsafe_destructor]
impl<T> Drop for PortOne<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
if self.suppress_finalize { return }
unsafe {
impl Drop for KillFlag {
// Letting a KillFlag with a task inside get dropped would leak the task.
// We could free it here, but the task should get awoken by hand somehow.
- fn drop(&self) {
+ fn drop(&mut self) {
match self.load(Relaxed) {
KILL_RUNNING | KILL_KILLED => { },
_ => rtabort!("can't drop kill flag with a blocked task inside!"),
}
impl Drop for Death {
- fn drop(&self) {
+ fn drop(&mut self) {
// Mustn't be in an atomic or unkillable section at task death.
rtassert!(self.unkillable == 0);
rtassert!(self.wont_sleep == 0);
impl Drop for LocalHeap {
#[fixed_stack_segment] #[inline(never)]
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
rust_delete_boxed_region(self.boxed_region);
rust_delete_memory_region(self.memory_region);
#[unsafe_destructor]
impl<T> Drop for RC<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
assert!(self.refcount() > 0);
unsafe {
struct S { field: () }
impl Drop for S {
- fn drop(&self) {
- let _foo = @0;
+ fn drop(&mut self) {
+ let _foo = @0;
}
}
let s = S { field: () };
do spawntask {
- let _ss = &s;
+ let _ss = &s;
}
}
}
}
impl Drop for StackSegment {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
unsafe {
}
impl Drop for Task {
- fn drop(&self) {
+ fn drop(&mut self) {
rtdebug!("called drop for a task: %u", borrow::to_uint(self));
rtassert!(self.destroyed)
}
}
impl Drop for Thread {
- fn drop(&self) {
+ fn drop(&mut self) {
#[fixed_stack_segment]; #[inline(never)];
assert!(self.joined);
}
impl Drop for UvEventLoop {
- fn drop(&self) {
+ fn drop(&mut self) {
// XXX: Need mutable finalizer
let this = unsafe {
transmute::<&UvEventLoop, &mut UvEventLoop>(self)
}
impl Drop for UvRemoteCallback {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
let this: &mut UvRemoteCallback = cast::transmute_mut(self);
do this.exit_flag.with |should_exit| {
}
impl Drop for UvTcpListener {
- fn drop(&self) {
+ fn drop(&mut self) {
// XXX need mutable finalizer
let self_ = unsafe { transmute::<&UvTcpListener, &mut UvTcpListener>(self) };
do self_.home_for_io_with_sched |self_, scheduler| {
}
impl Drop for UvTcpStream {
- fn drop(&self) {
+ fn drop(&mut self) {
// XXX need mutable finalizer
let this = unsafe { transmute::<&UvTcpStream, &mut UvTcpStream>(self) };
do this.home_for_io_with_sched |self_, scheduler| {
}
impl Drop for UvUdpSocket {
- fn drop(&self) {
+ fn drop(&mut self) {
// XXX need mutable finalizer
let this = unsafe { transmute::<&UvUdpSocket, &mut UvUdpSocket>(self) };
do this.home_for_io_with_sched |self_, scheduler| {
}
impl Drop for UvTimer {
- fn drop(&self) {
+ fn drop(&mut self) {
let self_ = unsafe { transmute::<&UvTimer, &mut UvTimer>(self) };
do self_.home_for_io_with_sched |self_, scheduler| {
rtdebug!("closing UvTimer");
}
impl Drop for UvFileStream {
- fn drop(&self) {
+ fn drop(&mut self) {
let self_ = unsafe { transmute::<&UvFileStream, &mut UvFileStream>(self) };
if self.close_on_drop {
do self_.home_for_io_with_sched |self_, scheduler| {
}
impl Drop for Process {
- fn drop(&self) {
- // FIXME(#4330) Need self by value to get mutability.
- let mut_self: &mut Process = unsafe { cast::transmute(self) };
-
- mut_self.finish();
- mut_self.close_outputs();
+ fn drop(&mut self) {
+ self.finish();
+ self.close_outputs();
free_handle(self.handle);
}
}
impl Drop for Taskgroup {
// Runs on task exit.
- fn drop(&self) {
- unsafe {
- // FIXME(#4330) Need self by value to get mutability.
- let this: &mut Taskgroup = transmute(self);
-
- // If we are failing, the whole taskgroup needs to die.
- do RuntimeGlue::with_task_handle_and_failing |me, failing| {
- if failing {
- for x in this.notifier.mut_iter() {
- x.failed = true;
- }
- // Take everybody down with us. After this point, every
- // other task in the group will see 'tg' as none, which
- // indicates the whole taskgroup is failing (and forbids
- // new spawns from succeeding).
- let tg = do access_group(&self.tasks) |tg| { tg.take() };
- // It's safe to send kill signals outside the lock, because
- // we have a refcount on all kill-handles in the group.
- kill_taskgroup(tg, me);
- } else {
- // Remove ourselves from the group(s).
- do access_group(&self.tasks) |tg| {
- leave_taskgroup(tg, me, true);
- }
+ fn drop(&mut self) {
+ // If we are failing, the whole taskgroup needs to die.
+ do RuntimeGlue::with_task_handle_and_failing |me, failing| {
+ if failing {
+ for x in self.notifier.mut_iter() {
+ x.failed = true;
+ }
+ // Take everybody down with us. After this point, every
+ // other task in the group will see 'tg' as none, which
+ // indicates the whole taskgroup is failing (and forbids
+ // new spawns from succeeding).
+ let tg = do access_group(&self.tasks) |tg| { tg.take() };
+ // It's safe to send kill signals outside the lock, because
+ // we have a refcount on all kill-handles in the group.
+ kill_taskgroup(tg, me);
+ } else {
+ // Remove ourselves from the group(s).
+ do access_group(&self.tasks) |tg| {
+ leave_taskgroup(tg, me, true);
}
- // It doesn't matter whether this happens before or after dealing
- // with our own taskgroup, so long as both happen before we die.
- // We remove ourself from every ancestor we can, so no cleanup; no
- // break.
- do each_ancestor(&mut this.ancestors, |_| {}) |ancestor_group| {
- leave_taskgroup(ancestor_group, me, false);
- true
- };
}
+ // It doesn't matter whether this happens before or after dealing
+ // with our own taskgroup, so long as both happen before we die.
+ // We remove ourself from every ancestor we can, so no cleanup; no
+ // break.
+ do each_ancestor(&mut self.ancestors, |_| {}) |ancestor_group| {
+ leave_taskgroup(ancestor_group, me, false);
+ true
+ };
}
}
}
}
impl Drop for AutoNotify {
- fn drop(&self) {
+ fn drop(&mut self) {
let result = if self.failed { Failure } else { Success };
self.notify_chan.send(result);
}
#[unsafe_destructor]
impl<T> Drop for AtomicOption<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
// This will ensure that the contained data is
// destroyed, unless it's null.
unsafe {
pub struct DynamicLibrary { priv handle: *libc::c_void }
impl Drop for DynamicLibrary {
- fn drop(&self) {
+ fn drop(&mut self) {
match do dl::check_for_errors_in {
unsafe {
dl::close(self.handle)
#[unsafe_destructor]
impl<'self> Drop for Finallyalizer<'self> {
- fn drop(&self) {
+ fn drop(&mut self) {
(self.dtor)();
}
}
#[unsafe_destructor]
impl<T> Drop for UnsafeArc<T>{
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
// Happens when destructing an unwrapper's handle and from `#[unsafe_no_drop_flag]`
if self.data.is_null() {
}
impl Drop for LittleLock {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
rust_destroy_little_lock(self.l);
}
}
impl Drop for NonCopyable {
- fn drop(&self) { }
+ fn drop(&mut self) { }
}
/// A type with no inhabitants
struct Foo { five: int }
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
assert_eq!(self.five, 5);
unsafe {
did_run = true;
#[unsafe_destructor]
impl Drop for Parser {
/* do not copy the parser; its state is tied to outside state */
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn is_plain_ident_or_underscore(t: &token::Token) -> bool {
#[unsafe_destructor]
impl<T:Freeze> Drop for arc_destruct<T> {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn arc_destruct<T:Freeze>(data: int) -> arc_destruct<T> {
}
impl Drop for context_res {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn context_res() -> context_res {
}
impl Drop for socket_handle {
- fn drop(&self) {
+ fn drop(&mut self) {
/* c::close(self.sockfd); */
}
}
}
impl Drop for rsrc {
- fn drop(&self) {
+ fn drop(&mut self) {
foo(self.x);
}
}
}
impl Drop for S {
- fn drop(&self) {
+ fn drop(&mut self) {
println("goodbye");
}
}
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn r(l: @nillist) -> r {
struct X { x: () }
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("destructor runs");
}
}
struct X { x: (), }
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("destructor runs");
}
}
struct X { x: (), }
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("destructor runs");
}
}
struct X { x: (), }
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("destructor runs");
}
}
struct X { x: (), }
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("destructor runs");
}
}
struct r;
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
true
}
}
#[unsafe_destructor]
impl<'self> Drop for defer<'self> {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
error!("%?", self.x);
}
struct S {f:~str}
impl Drop for S {
- fn drop(&self) { println(self.f); }
+ fn drop(&mut self) { println(self.f); }
}
fn move_in_match() {
struct S(~str);
impl Drop for S {
- fn drop(&self) { println(**self); }
+ fn drop(&mut self) { println(**self); }
}
fn move_in_match() {
}
impl Drop for foo {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn foo(i:int) -> foo {
}
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("value: %s", self.x);
}
}
}
impl Drop for X {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("value: %s", self.x);
}
}
impl Drop for Foo { //~ ERROR the Drop trait may only be implemented
//~^ ERROR cannot provide an extension implementation
- fn drop(&self) {
+ fn drop(&mut self) {
println("kaboom");
}
}
}
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
println("kaboom");
}
}
}
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
println("kaboom");
}
}
struct A { y: Arc<int>, x: Arc<int> }
impl Drop for A {
- fn drop(&self) { println(fmt!("x=%?", self.x.get())); }
+ fn drop(&mut self) { println(fmt!("x=%?", self.x.get())); }
}
fn main() {
let a = A { y: Arc::new(1), x: Arc::new(2) };
#[unsafe_destructor]
impl Drop for foo {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
println("Goodbye, World!");
*self.x += 1;
}
impl Drop for C {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("dropping: %?", self.x);
}
}
}
impl<T> Drop for foo<T> {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
}
fn main() { }
}
impl Drop for Foo { //~ ERROR cannot implement a destructor on a structure that does not satisfy Send
- fn drop(&self) {
+ fn drop(&mut self) {
*self.f = 10;
}
}
#[unsafe_destructor]
impl Drop for foo {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn foo(x: Port<()>) -> foo {
}
impl Drop for bar {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn bar(x:int) -> bar {
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
*(self.i) = *(self.i) + 1;
}
}
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
println("Goodbye!");
}
}
}
impl Drop for Bar {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
impl Foo for Bar {
}
impl Drop for r {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn main() {
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
*(self.i) = *(self.i) + 1;
}
}
impl Drop for S {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
impl S {
fn r(i:int) -> r { r { i: i } }
impl Drop for r {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn main() {
}
impl Drop for StructWithDestructor {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn main() {
}
impl Drop for StructWithDrop {
- fn drop(&self) {()}
+ fn drop(&mut self) {()}
}
fn main() {
}
impl Drop for Packed {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
#[packed]
}
impl Drop for Unpacked {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
#[packed]
}
impl Drop for PackedInPackedWithDrop {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
struct PackedInUnpackedWithDrop {
}
impl Drop for PackedInUnpackedWithDrop {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
#[packed]
}
impl Drop for UnpackedInPackedWithDrop {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
struct DeeplyNested {
}
impl Drop for WithDestructor {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
struct NoDestructorGuarded {
}
impl Drop for NestedInner {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
struct NestedOuter {
}
impl Drop for R {
- fn drop(&self) {
+ fn drop(&mut self) {
let _y = R { b: self.b };
}
}
}
impl Drop for and_then_get_big_again {
- fn drop(&self) {
+ fn drop(&mut self) {
fn getbig(i: int) {
if i != 0 {
getbig(i - 1);
}
impl Drop for and_then_get_big_again {
- fn drop(&self) {
+ fn drop(&mut self) {
fn getbig(i: int) {
if i != 0 {
getbig(i - 1);
}
impl Drop for and_then_get_big_again {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn and_then_get_big_again(x:int) -> and_then_get_big_again {
// failed has no effect and the process exits with the
// runtime's exit code
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
os::set_exit_status(50);
}
}
}
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
if !*(self.recursed) {
*(self.recursed) = true;
}
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
let _v2: ~int = cast::transmute(self.v);
}
}
impl Drop for r {
- fn drop(&self) { fail!("squirrel") }
+ fn drop(&mut self) { fail!("squirrel") }
}
fn r(i: int) -> r { r { i: i } }
}
impl Drop for r {
- fn drop(&self) { fail!("wombat") }
+ fn drop(&mut self) { fail!("wombat") }
}
fn r(i: int) -> r { r { i: i } }
#[unsafe_destructor]
impl Drop for faily_box {
- fn drop(&self) {
+ fn drop(&mut self) {
fail!("quux");
}
}
#[unsafe_destructor]
impl<T> Drop for Test<T> {
- fn drop(&self) { }
+ fn drop(&mut self) { }
}
fn main() {
}
impl Drop for noncopyable {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("dropped");
}
}
impl Drop for cat {
#[cat_dropper]
- fn drop(&self) { error!("%s landed on hir feet" , self . name); }
+ fn drop(&mut self) { error!("%s landed on hir feet" , self . name); }
}
/**
Actually, cats don't always land on their feet when you drop them.
*/
- fn drop(&self) {
+ fn drop(&mut self) {
error!("%s landed on hir feet", self.name);
}
}
}
impl Drop for cat {
- fn drop(&self) {
+ fn drop(&mut self) {
(self.done)(self.meows);
}
}
#[unsafe_destructor]
impl<T> ::std::ops::Drop for S<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
println("bye");
}
}
}
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
println("bye");
}
}
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
*(self.i) = *(self.i) + 1;
}
}
}
impl Drop for socket {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
impl socket {
}
impl Drop for Font {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn Font() -> Font {
#[unsafe_destructor]
impl<T:Send> Drop for send_packet<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
if self.p != None {
let self_p: &mut Option<*packet<T>> =
#[unsafe_destructor]
impl<T:Send> Drop for recv_packet<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
if self.p != None {
let self_p: &mut Option<*packet<T>> =
#[unsafe_destructor]
impl Drop for defer {
- fn drop(&self) {
+ fn drop(&mut self) {
*self.b = true;
}
}
#[unsafe_destructor]
impl Drop for defer {
- fn drop(&self) {
+ fn drop(&mut self) {
*self.b = true;
}
}
}
impl Drop for Kitty {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
#[cfg(target_arch = "x86_64")]
struct thing { x: int, }
impl Drop for thing {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn thing() -> thing {
}
impl Drop for AsciiArt {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
// It's common to define a constructor sort of function to create struct instances.
}
impl<T: X> Drop for Z<T> {
- fn drop(&self) {
+ fn drop(&mut self) {
self.x.call(); // Adding this statement causes an ICE.
}
}
struct NonCopyable(*c_void);
impl Drop for NonCopyable {
- fn drop(&self) {
+ fn drop(&mut self) {
let p = **self;
let _v = unsafe { transmute::<*c_void, ~int>(p) };
}
struct A { x: uint }
impl Drop for A {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn main() {}
\ No newline at end of file
struct A { x: uint }
impl Drop for A {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn main() {
struct A { x: uint }
impl Drop for A {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn main() {
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
*(self.b) += 1;
}
}
#[unsafe_destructor]
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
***self = 23;
}
}
impl Drop for Fd {
#[fixed_stack_segment] #[inline(never)]
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
libc::close(**self);
}
#[unsafe_destructor]
impl Drop for dtor {
- fn drop(&self) {
+ fn drop(&mut self) {
// abuse access to shared mutable state to write this code
*self.x -= 1;
}
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
*(self.i) += 1;
}
}
}
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
info!("r's dtor: self = %x, self.v = %x, self.v's value = %x",
- cast::transmute::<*r, uint>(self),
+ cast::transmute::<*mut r, uint>(self),
cast::transmute::<**int, uint>(&(self.v)),
cast::transmute::<*int, uint>(self.v));
let _v2: ~int = cast::transmute(self.v);
}
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
let _v2: ~int = cast::transmute(self.v.c);
}
}
impl Drop for R {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
let _v2: ~int = cast::transmute(self.v.c);
// let _v3: ~int = cast::transmute_copy(self.x);
#[unsafe_destructor]
impl Drop for shrinky_pointer {
- fn drop(&self) {
+ fn drop(&mut self) {
error!(~"Hello!"); **(self.i) -= 1;
}
}
#[unsafe_destructor]
impl Drop for close_res {
- fn drop(&self) {
+ fn drop(&mut self) {
*(self.i) = false;
}
}
}
impl Drop for test {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn test(f: int) -> test {
}
impl Drop for foo {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("%s", self.x);
}
}
#[unsafe_destructor]
impl Drop for notify {
- fn drop(&self) {
+ fn drop(&mut self) {
unsafe {
error!("notify: task=%? v=%x unwinding=%b b=%b",
0,
}
impl Drop for r {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn r(i:int) -> r {
#[unsafe_destructor]
impl Drop for r {
- fn drop(&self) {
+ fn drop(&mut self) {
*(self.i) = *(self.i) + 1;
}
}
struct Foo;
impl Drop for Foo {
- fn drop(&self) {
+ fn drop(&mut self) {
fail!("This failure should happen.");
}
}
}
impl Drop for complainer {
- fn drop(&self) {
+ fn drop(&mut self) {
error!("About to send!");
self.c.send(true);
error!("Sent!");
#[unsafe_destructor]
impl Drop for complainer {
- fn drop(&self) {}
+ fn drop(&mut self) {}
}
fn complainer(c: @int) -> complainer {
#[unsafe_destructor]
impl Drop for foo {
- fn drop(&self) {
+ fn drop(&mut self) {
*self.x += 1;
}
}