summary refs log tree commit diff
path: root/library/std/src/sync
diff options
context:
space:
mode:
authorHirochika Matsumoto <git@hkmatsumoto.com>2021-10-03 15:53:02 +0900
committerHirochika Matsumoto <git@hkmatsumoto.com>2021-10-03 16:16:28 +0900
commit3818981ca12ca79dc446fad849d48ebe1257cbc7 (patch)
tree35f2bda3785b1c5b5c167c3018e4c2758b8f5eb0 /library/std/src/sync
parent77f1e504a953efbbd59673a75c3cd530d5b3c530 (diff)
downloadrust-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.rs2
-rw-r--r--library/std/src/sync/rwlock.rs4
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`"
 )]