switch Drop to &mut self
This commit is contained in:
parent
bc89ade401
commit
4e161a4d40
129 changed files with 192 additions and 203 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ struct Finallyalizer<'self> {
|
|||
|
||||
#[unsafe_destructor]
|
||||
impl<'self> Drop for Finallyalizer<'self> {
|
||||
fn drop(&self) {
|
||||
fn drop(&mut self) {
|
||||
(self.dtor)();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue