diff options
| author | John Arundel <john@bitfieldconsulting.com> | 2024-07-15 12:26:30 +0100 |
|---|---|---|
| committer | John Arundel <john@bitfieldconsulting.com> | 2024-07-26 13:26:33 +0100 |
| commit | a19472a93e2eecce1477011fa9f7ec49b45ca164 (patch) | |
| tree | 3b7cee954a0c37ee98fbedd430fbf46a2ea12559 /library/alloc/src/boxed.rs | |
| parent | 83d67685acb520fe68d5d5adde4b25fb725490de (diff) | |
| download | rust-a19472a93e2eecce1477011fa9f7ec49b45ca164.tar.gz rust-a19472a93e2eecce1477011fa9f7ec49b45ca164.zip | |
Fix doc nits
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
Diffstat (limited to 'library/alloc/src/boxed.rs')
| -rw-r--r-- | library/alloc/src/boxed.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 405430377e5..0fc016aa32b 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1268,9 +1268,11 @@ impl<T: ?Sized, A: Allocator> Box<T, A> { } /// Consumes and leaks the `Box`, returning a mutable reference, - /// `&'a mut T`. Note that the type `T` must outlive the chosen lifetime - /// `'a`. If the type has only static references, or none at all, then this - /// may be chosen to be `'static`. + /// `&'a mut T`. + /// + /// Note that the type `T` must outlive the chosen lifetime `'a`. If the type + /// has only static references, or none at all, then this may be chosen to be + /// `'static`. /// /// This function is mainly useful for data that lives for the remainder of /// the program's life. Dropping the returned reference will cause a memory @@ -1853,7 +1855,7 @@ impl<T, const N: usize> TryFrom<Vec<T>> for Box<[T; N]> { } impl<A: Allocator> Box<dyn Any, A> { - /// Attempt to downcast the box to a concrete type. + /// Attempts to downcast the box to a concrete type. /// /// # Examples /// @@ -1912,7 +1914,7 @@ impl<A: Allocator> Box<dyn Any, A> { } impl<A: Allocator> Box<dyn Any + Send, A> { - /// Attempt to downcast the box to a concrete type. + /// Attempts to downcast the box to a concrete type. /// /// # Examples /// @@ -1971,7 +1973,7 @@ impl<A: Allocator> Box<dyn Any + Send, A> { } impl<A: Allocator> Box<dyn Any + Send + Sync, A> { - /// Attempt to downcast the box to a concrete type. + /// Attempts to downcast the box to a concrete type. /// /// # Examples /// |
