summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorBrian Anderson <andersrb@gmail.com>2015-05-11 11:22:01 -0700
committerBrian Anderson <andersrb@gmail.com>2015-05-11 11:22:01 -0700
commitfd815b7a57b0214362d53b5e4e0dc282c5c26dfd (patch)
treed3710cc7dcdb877fcc9c6622cab032c0c0920d8b /src/libstd/sys
parent781c2aa6200f45fe2ce6c4cb74779792c17add63 (diff)
parentf245929834543ca9a00278827a82d29ae3b2770f (diff)
downloadrust-fd815b7a57b0214362d53b5e4e0dc282c5c26dfd.tar.gz
rust-fd815b7a57b0214362d53b5e4e0dc282c5c26dfd.zip
Merge pull request #25299 from alexcrichton/beta-backport
Backport mem::forget to beta
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/fd.rs2
-rw-r--r--src/libstd/sys/windows/handle.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs
index e5bdb554359..026380027d2 100644
--- a/src/libstd/sys/unix/fd.rs
+++ b/src/libstd/sys/unix/fd.rs
@@ -31,7 +31,7 @@ impl FileDesc {
     /// Extracts the actual filedescriptor without closing it.
     pub fn into_raw(self) -> c_int {
         let fd = self.fd;
-        unsafe { mem::forget(self) };
+        mem::forget(self);
         fd
     }
 
diff --git a/src/libstd/sys/windows/handle.rs b/src/libstd/sys/windows/handle.rs
index 9481e180ce5..c835d503388 100644
--- a/src/libstd/sys/windows/handle.rs
+++ b/src/libstd/sys/windows/handle.rs
@@ -32,7 +32,7 @@ impl Handle {
 
     pub fn into_raw(self) -> HANDLE {
         let ret = self.0;
-        unsafe { mem::forget(self) }
+        mem::forget(self);
         return ret;
     }