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/vec | |
| parent | 85237886df31ba237acd3b7912336704026813f5 (diff) | |
Fix may not to appropriate might not or must not
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/vec/source_iter_marker.rs | 2 |
2 files changed, 2 insertions, 2 deletions
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 |
