diff options
| author | Ali Malik <mikli@amazon.com> | 2021-07-23 19:14:28 -0400 |
|---|---|---|
| committer | Ali Malik <mikli@amazon.com> | 2021-07-29 01:15:20 -0400 |
| commit | e43254aad1ea5758078ace51341f31071e1e61a8 (patch) | |
| tree | 2dff253d1ded27a831d8ad773d5b0df8ae72666b /library/alloc/src | |
| parent | 85237886df31ba237acd3b7912336704026813f5 (diff) | |
| download | rust-e43254aad1ea5758078ace51341f31071e1e61a8.tar.gz rust-e43254aad1ea5758078ace51341f31071e1e61a8.zip | |
Fix may not to appropriate might not or must not
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/btree/node.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/fmt.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/rc.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/string.rs | 6 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 6 | ||||
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/vec/source_iter_marker.rs | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/library/alloc/src/collections/btree/node.rs b/library/alloc/src/collections/btree/node.rs index 30d237d8bbc..f6886b275e1 100644 --- a/library/alloc/src/collections/btree/node.rs +++ b/library/alloc/src/collections/btree/node.rs @@ -409,7 +409,7 @@ impl<K, V> NodeRef<marker::Dying, K, V, marker::LeafOrInternal> { impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> { /// Temporarily takes out another mutable reference to the same node. Beware, as - /// this method is very dangerous, doubly so since it may not immediately appear + /// this method is very dangerous, doubly so since it might not immediately appear /// dangerous. /// /// Because mutable pointers can roam anywhere around the tree, the returned @@ -777,7 +777,7 @@ impl<BorrowType, K, V, NodeType, HandleType> impl<'a, K, V, NodeType, HandleType> Handle<NodeRef<marker::Mut<'a>, K, V, NodeType>, HandleType> { /// Temporarily takes out another mutable handle on the same location. Beware, as - /// this method is very dangerous, doubly so since it may not immediately appear + /// this method is very dangerous, doubly so since it might not immediately appear /// dangerous. /// /// For details, see `NodeRef::reborrow_mut`. diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index fd5ee189fbf..8c5125d2082 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -138,7 +138,7 @@ //! the `0` flag (see below) is specified for numerics, then the implicit fill character is //! `0`. //! -//! Note that alignment may not be implemented by some types. In particular, it +//! Note that alignment might not be implemented by some types. In particular, it //! is not generally implemented for the `Debug` trait. A good way to ensure //! padding is applied is to format your input, then pad this resulting string //! to obtain your output: @@ -300,7 +300,7 @@ //! count := parameter | integer //! parameter := argument '$' //! ``` -//! In the above grammar, `text` may not contain any `'{'` or `'}'` characters. +//! In the above grammar, `text` must not contain any `'{'` or `'}'` characters. //! //! # Formatting traits //! diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index e116ab6483c..a1787ceac59 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2526,7 +2526,7 @@ unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize { // SAFETY: since the only unsized types possible are slices, trait objects, // and extern types, the input safety requirement is currently enough to // satisfy the requirements of align_of_val_raw; this is an implementation - // detail of the language that may not be relied upon outside of std. + // detail of the language that must not be relied upon outside of std. unsafe { data_offset_align(align_of_val_raw(ptr)) } } diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 0d8678291be..bc5ab3637ae 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -921,7 +921,7 @@ impl String { /// assert!(s.capacity() >= 10); /// ``` /// - /// This may not actually increase the capacity: + /// This might not actually increase the capacity: /// /// ``` /// let mut s = String::with_capacity(10); @@ -969,7 +969,7 @@ impl String { /// assert!(s.capacity() >= 10); /// ``` /// - /// This may not actually increase the capacity: + /// This might not actually increase the capacity: /// /// ``` /// let mut s = String::with_capacity(10); @@ -1517,7 +1517,7 @@ impl String { } /// Returns the length of this `String`, in bytes, not [`char`]s or - /// graphemes. In other words, it may not be what a human considers the + /// graphemes. In other words, it might not be what a human considers the /// length of the string. /// /// # Examples diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index d821e715622..78671c4f64e 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1056,8 +1056,8 @@ impl<T: ?Sized> Arc<T> { // Non-inlined part of `drop`. #[inline(never)] unsafe fn drop_slow(&mut self) { - // Destroy the data at this time, even though we may not free the box - // allocation itself (there may still be weak pointers lying around). + // Destroy the data at this time, even though we must not free the box + // allocation itself (there might still be weak pointers lying around). unsafe { ptr::drop_in_place(Self::get_mut_unchecked(self)) }; // Drop the weak ref collectively held by all strong references @@ -2587,7 +2587,7 @@ unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize { // SAFETY: since the only unsized types possible are slices, trait objects, // and extern types, the input safety requirement is currently enough to // satisfy the requirements of align_of_val_raw; this is an implementation - // detail of the language that may not be relied upon outside of std. + // detail of the language that must not be relied upon outside of std. unsafe { data_offset_align(align_of_val_raw(ptr)) } } diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 2b380c444b8..06a7c335bf0 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2229,7 +2229,7 @@ impl<T, A: Allocator> Vec<T, A> { unsafe { let mut ptr = self.as_mut_ptr().add(self.len()); // Use SetLenOnDrop to work around bug where compiler - // may not realize the store through `ptr` through self.set_len() + // might not realize the store through `ptr` through self.set_len() // don't alias. let mut local_len = SetLenOnDrop::new(&mut self.len); diff --git a/library/alloc/src/vec/source_iter_marker.rs b/library/alloc/src/vec/source_iter_marker.rs index 23a2e313c01..e05788d99c0 100644 --- a/library/alloc/src/vec/source_iter_marker.rs +++ b/library/alloc/src/vec/source_iter_marker.rs @@ -56,7 +56,7 @@ where let src = unsafe { iterator.as_inner().as_into_iter() }; // check if SourceIter contract was upheld - // caveat: if they weren't we may not even make it to this point + // caveat: if they weren't we might not even make it to this point debug_assert_eq!(src_buf, src.buf.as_ptr()); // check InPlaceIterable contract. This is only possible if the iterator advanced the // source pointer at all. If it uses unchecked access via TrustedRandomAccess |
