From 86c56ecb1d2c3d784020b25c0b00bc29fa5c0a66 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 30 Mar 2015 11:25:14 -0700 Subject: Remove the unsafe destructor feature --- src/agent.rs | 1 - src/channel.rs | 1 - src/knownhosts.rs | 1 - src/lib.rs | 2 +- src/listener.rs | 1 - src/sftp.rs | 2 -- 6 files changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/agent.rs b/src/agent.rs index 0e042ab..79b939a 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -73,7 +73,6 @@ impl<'sess> SessionBinding<'sess> for Agent<'sess> { fn raw(&self) -> *mut raw::LIBSSH2_AGENT { self.raw } } -#[unsafe_destructor] impl<'a> Drop for Agent<'a> { fn drop(&mut self) { unsafe { raw::libssh2_agent_free(self.raw) } diff --git a/src/channel.rs b/src/channel.rs index 5135c22..5448333 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -368,7 +368,6 @@ impl<'sess> Read for Channel<'sess> { } } -#[unsafe_destructor] impl<'sess> Drop for Channel<'sess> { fn drop(&mut self) { unsafe { assert_eq!(raw::libssh2_channel_free(self.raw), 0) } diff --git a/src/knownhosts.rs b/src/knownhosts.rs index d673660..e8355c4 100644 --- a/src/knownhosts.rs +++ b/src/knownhosts.rs @@ -221,7 +221,6 @@ impl<'sess> SessionBinding<'sess> for KnownHosts<'sess> { } -#[unsafe_destructor] impl<'sess> Drop for KnownHosts<'sess> { fn drop(&mut self) { unsafe { raw::libssh2_knownhost_free(self.raw) } diff --git a/src/lib.rs b/src/lib.rs index dbaf512..8849c6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -124,7 +124,7 @@ //! ``` #![doc(html_root_url = "http://alexcrichton.com/ssh2-rs")] -#![feature(unsafe_destructor, io, io_ext, convert)] +#![feature(io, io_ext, convert)] #![allow(trivial_numeric_casts)] #![deny(missing_docs, unused_results)] #![cfg_attr(test, deny(warnings))] diff --git a/src/listener.rs b/src/listener.rs index a4c6f5e..f9dab07 100644 --- a/src/listener.rs +++ b/src/listener.rs @@ -33,7 +33,6 @@ impl<'sess> SessionBinding<'sess> for Listener<'sess> { fn raw(&self) -> *mut raw::LIBSSH2_LISTENER { self.raw } } -#[unsafe_destructor] impl<'sess> Drop for Listener<'sess> { fn drop(&mut self) { unsafe { diff --git a/src/sftp.rs b/src/sftp.rs index d4646dc..0159c6d 100644 --- a/src/sftp.rs +++ b/src/sftp.rs @@ -332,7 +332,6 @@ impl<'sess> SessionBinding<'sess> for Sftp<'sess> { } -#[unsafe_destructor] impl<'sess> Drop for Sftp<'sess> { fn drop(&mut self) { unsafe { assert_eq!(raw::libssh2_sftp_shutdown(self.raw), 0) } @@ -498,7 +497,6 @@ impl<'sftp> Seek for File<'sftp> { } } -#[unsafe_destructor] impl<'sftp> Drop for File<'sftp> { fn drop(&mut self) { unsafe { assert_eq!(raw::libssh2_sftp_close_handle(self.raw), 0) } -- cgit v1.2.3