diff options
author | Haibo Huang <hhb@google.com> | 2020-11-17 19:12:54 -0800 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2020-11-17 19:12:54 -0800 |
commit | 83d9052fc80d8b9f29047ce00ff5d70320464e9b (patch) | |
tree | 17fc7ed409dace42a92085643c7610299d5167d8 | |
parent | 502faaf1f398c6cea16f4d7186d6df05082f58a7 (diff) | |
download | lock_api-83d9052fc80d8b9f29047ce00ff5d70320464e9b.tar.gz |
Upgrade rust/crates/lock_api to 0.4.2
Test: make
Change-Id: I135d071f7272d7fe7b3a32f42a983945e4698ffd
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/mutex.rs | 2 | ||||
-rw-r--r-- | src/rwlock.rs | 8 |
7 files changed, 12 insertions, 14 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index d56acc5..e1a0b04 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "74218898303e2ccbc57b864ad868b859f57e1fb8" + "sha1": "86969fd7baf94312520e0b5a5f3b0861a0fd411b" } } @@ -13,7 +13,7 @@ [package] edition = "2018" name = "lock_api" -version = "0.4.1" +version = "0.4.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std." keywords = ["mutex", "rwlock", "lock", "no_std"] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 1426c14..9e884a4 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "lock_api" -version = "0.4.1" +version = "0.4.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std." license = "Apache-2.0/MIT" @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/lock_api/lock_api-0.4.1.crate" + value: "https://static.crates.io/crates/lock_api/lock_api-0.4.2.crate" } - version: "0.4.1" + version: "0.4.2" license_type: NOTICE last_upgrade_date { year: 2020 - month: 10 - day: 20 + month: 11 + day: 17 } } @@ -99,6 +99,8 @@ pub struct GuardSend(()); /// Marker type which indicates that the Guard type for a lock is not `Send`. pub struct GuardNoSend(*mut ()); +unsafe impl Sync for GuardNoSend {} + mod mutex; pub use crate::mutex::*; diff --git a/src/mutex.rs b/src/mutex.rs index e435d8a..aded96d 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -601,7 +601,7 @@ unsafe impl<'a, R: RawMutex + Sync + 'a, T: ?Sized + Sync + 'a> Sync for MappedMutexGuard<'a, R, T> { } -unsafe impl<'a, R: RawMutex + 'a, T: ?Sized + 'a> Send for MappedMutexGuard<'a, R, T> where +unsafe impl<'a, R: RawMutex + 'a, T: ?Sized + Send + 'a> Send for MappedMutexGuard<'a, R, T> where R::GuardMarker: Send { } diff --git a/src/rwlock.rs b/src/rwlock.rs index a25c2f4..e97de98 100644 --- a/src/rwlock.rs +++ b/src/rwlock.rs @@ -875,8 +875,6 @@ pub struct RwLockReadGuard<'a, R: RawRwLock, T: ?Sized> { marker: PhantomData<(&'a T, R::GuardMarker)>, } -unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + Sync + 'a> Sync for RwLockReadGuard<'a, R, T> {} - impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> RwLockReadGuard<'a, R, T> { /// Returns a reference to the original reader-writer lock object. pub fn rwlock(s: &Self) -> &'a RwLock<R, T> { @@ -1051,8 +1049,6 @@ pub struct RwLockWriteGuard<'a, R: RawRwLock, T: ?Sized> { marker: PhantomData<(&'a mut T, R::GuardMarker)>, } -unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + Sync + 'a> Sync for RwLockWriteGuard<'a, R, T> {} - impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> RwLockWriteGuard<'a, R, T> { /// Returns a reference to the original reader-writer lock object. pub fn rwlock(s: &Self) -> &'a RwLock<R, T> { @@ -1514,7 +1510,7 @@ pub struct MappedRwLockReadGuard<'a, R: RawRwLock, T: ?Sized> { } unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + Sync + 'a> Sync for MappedRwLockReadGuard<'a, R, T> {} -unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Send for MappedRwLockReadGuard<'a, R, T> where +unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + Sync + 'a> Send for MappedRwLockReadGuard<'a, R, T> where R::GuardMarker: Send { } @@ -1652,7 +1648,7 @@ unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + Sync + 'a> Sync for MappedRwLockWriteGuard<'a, R, T> { } -unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Send for MappedRwLockWriteGuard<'a, R, T> where +unsafe impl<'a, R: RawRwLock + 'a, T: ?Sized + Send + 'a> Send for MappedRwLockWriteGuard<'a, R, T> where R::GuardMarker: Send { } |