diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-09 21:23:30 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-02-10 23:42:32 +0000 |
| commit | b87363e7632b3f20f9b529696ffb5d5d9c3927cd (patch) | |
| tree | 49fee4866ed6c2d5b61562e67afe09625de217d8 /src/liballoc | |
| parent | c3e182cf43aea2c010a1915eb37293a458df2228 (diff) | |
| download | rust-b87363e7632b3f20f9b529696ffb5d5d9c3927cd.tar.gz rust-b87363e7632b3f20f9b529696ffb5d5d9c3927cd.zip | |
tests: doc comments
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/fmt.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/macros.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/vec.rs | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index c4f39430533..481ee7cebc4 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -50,11 +50,11 @@ pub const CAPACITY: usize = 2 * B - 1; /// /// We have a separate type for the header and rely on it matching the prefix of `LeafNode`, in /// order to statically allocate a single dummy node to avoid allocations. This struct is -/// `repr(C)` to prevent them from being reordered. `LeafNode` does not just contain a +/// `repr(C)` to prevent them from being reordered. `LeafNode` does not just contain a /// `NodeHeader` because we do not want unnecessary padding between `len` and the keys. -/// Crucially, `NodeHeader` can be safely transmuted to different K and V. (This is exploited +/// Crucially, `NodeHeader` can be safely transmuted to different K and V. (This is exploited /// by `as_header`.) -/// See `into_key_slice` for an explanation of K2. K2 cannot be safely transmuted around +/// See `into_key_slice` for an explanation of K2. K2 cannot be safely transmuted around /// because the size of `NodeHeader` depends on its alignment! #[repr(C)] struct NodeHeader<K, V, K2 = ()> { diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index 99fa54acb08..a292bde3315 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -1922,7 +1922,7 @@ impl<T> VecDeque<T> { /// /// # Panics /// - /// If `mid` is greater than `len()`. Note that `mid == len()` + /// If `mid` is greater than `len()`. Note that `mid == len()` /// does _not_ panic and is a no-op rotation. /// /// # Complexity @@ -1967,7 +1967,7 @@ impl<T> VecDeque<T> { /// /// # Panics /// - /// If `k` is greater than `len()`. Note that `k == len()` + /// If `k` is greater than `len()`. Note that `k == len()` /// does _not_ panic and is a no-op rotation. /// /// # Complexity diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 9bda7034a62..d2ba9b00191 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -27,7 +27,7 @@ //! will then parse the format string and determine if the list of arguments //! provided is suitable to pass to this format string. //! -//! To convert a single value to a string, use the [`to_string`] method. This +//! To convert a single value to a string, use the [`to_string`] method. This //! will use the [`Display`] formatting trait. //! //! ## Positional parameters @@ -102,7 +102,7 @@ //! When requesting that an argument be formatted with a particular type, you //! are actually requesting that an argument ascribes to a particular trait. //! This allows multiple actual types to be formatted via `{:x}` (like [`i8`] as -//! well as [`isize`]). The current mapping of types to traits is: +//! well as [`isize`]). The current mapping of types to traits is: //! //! * *nothing* ⇒ [`Display`] //! * `?` ⇒ [`Debug`] @@ -427,7 +427,7 @@ //! 3. An asterisk `.*`: //! //! `.*` means that this `{...}` is associated with *two* format inputs rather than one: the -//! first input holds the `usize` precision, and the second holds the value to print. Note that +//! first input holds the `usize` precision, and the second holds the value to print. Note that //! in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers //! to the *value* to print, and the `precision` must come in the input preceding `<arg>`. //! diff --git a/src/liballoc/macros.rs b/src/liballoc/macros.rs index db91b07fa71..4fe6d450add 100644 --- a/src/liballoc/macros.rs +++ b/src/liballoc/macros.rs @@ -62,8 +62,8 @@ macro_rules! vec { /// Creates a `String` using interpolation of runtime expressions. /// -/// The first argument `format!` receives is a format string. This must be a string -/// literal. The power of the formatting string is in the `{}`s contained. +/// The first argument `format!` receives is a format string. This must be a string +/// literal. The power of the formatting string is in the `{}`s contained. /// /// Additional parameters passed to `format!` replace the `{}`s within the /// formatting string in the order given unless named or positional parameters @@ -73,7 +73,7 @@ macro_rules! vec { /// The same convention is used with [`print!`] and [`write!`] macros, /// depending on the intended destination of the string. /// -/// To convert a single value to a string, use the [`to_string`] method. This +/// To convert a single value to a string, use the [`to_string`] method. This /// will use the [`Display`] formatting trait. /// /// [fmt]: ../std/fmt/index.html diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 57e10498b92..4bc21ec7f5e 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -738,7 +738,7 @@ impl<T> Vec<T> { /// Forces the length of the vector to `new_len`. /// /// This is a low-level operation that maintains none of the normal - /// invariants of the type. Normally changing the length of a vector + /// invariants of the type. Normally changing the length of a vector /// is done using one of the safe operations instead, such as /// [`truncate`], [`resize`], [`extend`], or [`clear`]. /// |
