diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-12-06 11:39:25 -0500 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-12-26 17:26:32 +0100 |
| commit | fb803a857000813e4d572900799f0498fb20050b (patch) | |
| tree | a1247d535c6dbb3fcaca0743cda7900481d14053 /src/libstd/rt | |
| parent | c43efee6def9a4a4e943feef0236d3e17b3f581d (diff) | |
| download | rust-fb803a857000813e4d572900799f0498fb20050b.tar.gz rust-fb803a857000813e4d572900799f0498fb20050b.zip | |
Require types to opt-in Sync
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/exclusive.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/rt/exclusive.rs b/src/libstd/rt/exclusive.rs index 1d3082d1b4c..a878066ad16 100644 --- a/src/libstd/rt/exclusive.rs +++ b/src/libstd/rt/exclusive.rs @@ -26,6 +26,10 @@ pub struct Exclusive<T> { data: UnsafeCell<T>, } +impl<T:Send> Send for Exclusive<T> { } + +impl<T:Send> Sync for Exclusive<T> { } + /// An RAII guard returned via `lock` pub struct ExclusiveGuard<'a, T:'a> { // FIXME #12808: strange name to try to avoid interfering with |
