switch Drop to &mut self

This commit is contained in:
Daniel Micay 2013-09-16 21:18:07 -04:00
parent bc89ade401
commit 4e161a4d40
129 changed files with 192 additions and 203 deletions

View file

@ -338,7 +338,7 @@ impl<T> AtomicOption<T> {
#[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 {

View file

@ -26,7 +26,7 @@ use result::*;
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)

View file

@ -64,7 +64,7 @@ struct Finallyalizer<'self> {
#[unsafe_destructor]
impl<'self> Drop for Finallyalizer<'self> {
fn drop(&self) {
fn drop(&mut self) {
(self.dtor)();
}
}

View file

@ -220,7 +220,7 @@ impl<T: Send> Clone for UnsafeArc<T> {
#[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() {
@ -308,7 +308,7 @@ pub struct LittleLock {
}
impl Drop for LittleLock {
fn drop(&self) {
fn drop(&mut self) {
unsafe {
rust_destroy_little_lock(self.l);
}