Skip to content

Commit 0c81718

Browse files
committed
Implement lint against dangerous implicit autorefs
1 parent 1ce17ed commit 0c81718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alloc/src/vec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ impl<T, A: Allocator> Vec<T, A> {
25882588
#[inline]
25892589
#[track_caller]
25902590
unsafe fn append_elements(&mut self, other: *const [T]) {
2591-
let count = unsafe { (*other).len() };
2591+
let count = other.len();
25922592
self.reserve(count);
25932593
let len = self.len();
25942594
unsafe { ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) };

0 commit comments

Comments
 (0)