@@ -167,7 +167,7 @@ impl<T> RwLock<T> {
167167}
168168
169169impl < T : ?Sized > RwLock < T > {
170- /// Locks this rwlock with shared read access, blocking the current thread
170+ /// Locks this `RwLock` with shared read access, blocking the current thread
171171 /// until it can be acquired.
172172 ///
173173 /// The calling thread will be blocked until there are no more writers which
@@ -181,9 +181,10 @@ impl<T: ?Sized> RwLock<T> {
181181 ///
182182 /// # Errors
183183 ///
184- /// This function will return an error if the RwLock is poisoned. An RwLock
185- /// is poisoned whenever a writer panics while holding an exclusive lock.
186- /// The failure will occur immediately after the lock has been acquired.
184+ /// This function will return an error if the `RwLock` is poisoned. An
185+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
186+ /// lock. The failure will occur immediately after the lock has been
187+ /// acquired.
187188 ///
188189 /// # Panics
189190 ///
@@ -215,7 +216,7 @@ impl<T: ?Sized> RwLock<T> {
215216 }
216217 }
217218
218- /// Attempts to acquire this rwlock with shared read access.
219+ /// Attempts to acquire this `RwLock` with shared read access.
219220 ///
220221 /// If the access could not be granted at this time, then `Err` is returned.
221222 /// Otherwise, an RAII guard is returned which will release the shared access
@@ -228,13 +229,13 @@ impl<T: ?Sized> RwLock<T> {
228229 ///
229230 /// # Errors
230231 ///
231- /// This function will return the [`Poisoned`] error if the RwLock is poisoned.
232- /// An RwLock is poisoned whenever a writer panics while holding an exclusive
233- /// lock. `Poisoned` will only be returned if the lock would have otherwise been
234- /// acquired.
232+ /// This function will return the [`Poisoned`] error if the ` RwLock` is
233+ /// poisoned. An ` RwLock` is poisoned whenever a writer panics while holding
234+ /// an exclusive lock. `Poisoned` will only be returned if the lock would
235+ /// have otherwise been acquired.
235236 ///
236- /// This function will return the [`WouldBlock`] error if the RwLock could not
237- /// be acquired because it was already locked exclusively.
237+ /// This function will return the [`WouldBlock`] error if the ` RwLock` could
238+ /// not be acquired because it was already locked exclusively.
238239 ///
239240 /// [`Poisoned`]: TryLockError::Poisoned
240241 /// [`WouldBlock`]: TryLockError::WouldBlock
@@ -263,20 +264,20 @@ impl<T: ?Sized> RwLock<T> {
263264 }
264265 }
265266
266- /// Locks this rwlock with exclusive write access, blocking the current
267+ /// Locks this `RwLock` with exclusive write access, blocking the current
267268 /// thread until it can be acquired.
268269 ///
269270 /// This function will not return while other writers or other readers
270271 /// currently have access to the lock.
271272 ///
272- /// Returns an RAII guard which will drop the write access of this rwlock
273+ /// Returns an RAII guard which will drop the write access of this `RwLock`
273274 /// when dropped.
274275 ///
275276 /// # Errors
276277 ///
277- /// This function will return an error if the RwLock is poisoned. An RwLock
278- /// is poisoned whenever a writer panics while holding an exclusive lock.
279- /// An error will be returned when the lock is acquired.
278+ /// This function will return an error if the ` RwLock` is poisoned. An
279+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
280+ /// lock. An error will be returned when the lock is acquired.
280281 ///
281282 /// # Panics
282283 ///
@@ -303,7 +304,7 @@ impl<T: ?Sized> RwLock<T> {
303304 }
304305 }
305306
306- /// Attempts to lock this rwlock with exclusive write access.
307+ /// Attempts to lock this `RwLock` with exclusive write access.
307308 ///
308309 /// If the lock could not be acquired at this time, then `Err` is returned.
309310 /// Otherwise, an RAII guard is returned which will release the lock when
@@ -316,13 +317,13 @@ impl<T: ?Sized> RwLock<T> {
316317 ///
317318 /// # Errors
318319 ///
319- /// This function will return the [`Poisoned`] error if the RwLock is
320- /// poisoned. An RwLock is poisoned whenever a writer panics while holding
321- /// an exclusive lock. `Poisoned` will only be returned if the lock would have
322- /// otherwise been acquired.
320+ /// This function will return the [`Poisoned`] error if the ` RwLock` is
321+ /// poisoned. An ` RwLock` is poisoned whenever a writer panics while holding
322+ /// an exclusive lock. `Poisoned` will only be returned if the lock would
323+ /// have otherwise been acquired.
323324 ///
324- /// This function will return the [`WouldBlock`] error if the RwLock could not
325- /// be acquired because it was already locked exclusively.
325+ /// This function will return the [`WouldBlock`] error if the ` RwLock` could
326+ /// not be acquired because it was already locked exclusively.
326327 ///
327328 /// [`Poisoned`]: TryLockError::Poisoned
328329 /// [`WouldBlock`]: TryLockError::WouldBlock
@@ -422,10 +423,10 @@ impl<T: ?Sized> RwLock<T> {
422423 ///
423424 /// # Errors
424425 ///
425- /// This function will return an error if the RwLock is poisoned. An RwLock
426- /// is poisoned whenever a writer panics while holding an exclusive lock. An
427- /// error will only be returned if the lock would have otherwise been
428- /// acquired.
426+ /// This function will return an error if the ` RwLock` is poisoned. An
427+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
428+ /// lock. An error will only be returned if the lock would have otherwise
429+ /// been acquired.
429430 ///
430431 /// # Examples
431432 ///
@@ -455,10 +456,10 @@ impl<T: ?Sized> RwLock<T> {
455456 ///
456457 /// # Errors
457458 ///
458- /// This function will return an error if the RwLock is poisoned. An RwLock
459- /// is poisoned whenever a writer panics while holding an exclusive lock. An
460- /// error will only be returned if the lock would have otherwise been
461- /// acquired.
459+ /// This function will return an error if the ` RwLock` is poisoned. An
460+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
461+ /// lock. An error will only be returned if the lock would have otherwise
462+ /// been acquired.
462463 ///
463464 /// # Examples
464465 ///
0 commit comments