1
Fork 0

Fix may not to appropriate might not or must not

This commit is contained in:
Ali Malik 2021-07-23 19:14:28 -04:00
parent 85237886df
commit e43254aad1
50 changed files with 100 additions and 96 deletions

View file

@ -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);