about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-07-03 11:31:03 +0200
committerGitHub <noreply@github.com>2018-07-03 11:31:03 +0200
commit0ceeb1be31b52837e270a3349f9c62087ff11985 (patch)
tree24afda5e4e332fa30ca5e89b6cf4497cc1e382bf /src/libstd/sys_common
parentbd0fe736beb9142073da68b62a0002b12e1f9bc7 (diff)
parent9797665b286db3f34cc475560a68380012fadde7 (diff)
downloadrust-0ceeb1be31b52837e270a3349f9c62087ff11985.tar.gz
rust-0ceeb1be31b52837e270a3349f9c62087ff11985.zip
Rollup merge of #51973 - estk:master, r=abonander
Make Stdio handle UnwindSafe

Closes  #51863

This is my first compiler PR. Thanks Niko for the mentor help!

r? @nikomatsakis
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/remutex.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys_common/remutex.rs b/src/libstd/sys_common/remutex.rs
index 022056f8a8a..071a3a25c7a 100644
--- a/src/libstd/sys_common/remutex.rs
+++ b/src/libstd/sys_common/remutex.rs
@@ -13,6 +13,7 @@ use marker;
 use ops::Deref;
 use sys_common::poison::{self, TryLockError, TryLockResult, LockResult};
 use sys::mutex as sys;
+use panic::{UnwindSafe, RefUnwindSafe};
 
 /// A re-entrant mutual exclusion
 ///
@@ -28,6 +29,9 @@ pub struct ReentrantMutex<T> {
 unsafe impl<T: Send> Send for ReentrantMutex<T> {}
 unsafe impl<T: Send> Sync for ReentrantMutex<T> {}
 
+impl<T> UnwindSafe for ReentrantMutex<T> {}
+impl<T> RefUnwindSafe for ReentrantMutex<T> {}
+
 
 /// An RAII implementation of a "scoped lock" of a mutex. When this structure is
 /// dropped (falls out of scope), the lock will be unlocked.