diff options
| author | Hirochika Matsumoto <git@hkmatsumoto.com> | 2021-10-03 15:53:02 +0900 |
|---|---|---|
| committer | Hirochika Matsumoto <git@hkmatsumoto.com> | 2021-10-03 16:16:28 +0900 |
| commit | 3818981ca12ca79dc446fad849d48ebe1257cbc7 (patch) | |
| tree | 35f2bda3785b1c5b5c167c3018e4c2758b8f5eb0 /library/std/src/sync | |
| parent | 77f1e504a953efbbd59673a75c3cd530d5b3c530 (diff) | |
| download | rust-3818981ca12ca79dc446fad849d48ebe1257cbc7.tar.gz rust-3818981ca12ca79dc446fad849d48ebe1257cbc7.zip | |
Practice diagnostic message convention
Diffstat (limited to 'library/std/src/sync')
| -rw-r--r-- | library/std/src/sync/mutex.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sync/rwlock.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs index 0d844547376..57f1dcca30e 100644 --- a/library/std/src/sync/mutex.rs +++ b/library/std/src/sync/mutex.rs @@ -190,7 +190,7 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> {} #[must_use = "if unused the Mutex will immediately unlock"] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a MutexGuard across suspend \ + must_not_suspend = "holding a MutexGuard across suspend \ points can cause deadlocks, delays, \ and cause Futures to not implement `Send`" )] diff --git a/library/std/src/sync/rwlock.rs b/library/std/src/sync/rwlock.rs index aa1ce82d967..2f4395ceefd 100644 --- a/library/std/src/sync/rwlock.rs +++ b/library/std/src/sync/rwlock.rs @@ -97,7 +97,7 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {} #[must_use = "if unused the RwLock will immediately unlock"] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a RwLockReadGuard across suspend \ + must_not_suspend = "holding a RwLockReadGuard across suspend \ points can cause deadlocks, delays, \ and cause Futures to not implement `Send`" )] @@ -123,7 +123,7 @@ unsafe impl<T: ?Sized + Sync> Sync for RwLockReadGuard<'_, T> {} #[must_use = "if unused the RwLock will immediately unlock"] #[cfg_attr( not(bootstrap), - must_not_suspend = "Holding a RwLockWriteGuard across suspend \ + must_not_suspend = "holding a RwLockWriteGuard across suspend \ points can cause deadlocks, delays, \ and cause Future's to not implement `Send`" )] |
