Upgrade rust/crates/lock_api to 0.4.2 am: 83d9052fc8 am: 374811e27f am: ff90c94a2b am: 7d8132e72b Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/lock_api/+/1502096 Change-Id: I21732032421c732e64bb35ce00192a97640064a4
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" } }
diff --git a/Cargo.toml b/Cargo.toml index 7d249b5..cdc5b16 100644 --- a/Cargo.toml +++ b/Cargo.toml
@@ -13,7 +13,7 @@ [package] edition = "2018" name = "lock_api" -version = "0.4.1" +version = "0.4.2" authors = ["Amanieu d'Antras <[email protected]>"] 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 <[email protected]>"] description = "Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std." license = "Apache-2.0/MIT"
diff --git a/METADATA b/METADATA index c2340e5..a684451 100644 --- a/METADATA +++ b/METADATA
@@ -7,13 +7,13 @@ } 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 } }
diff --git a/src/lib.rs b/src/lib.rs index de72442..d9097a3 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -99,6 +99,8 @@ /// 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 { }