File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/alloc/src/raw_vec Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -658,7 +658,7 @@ impl<A: Allocator> RawVecInner<A> {
658
658
let new_layout = layout_array ( cap, elem_layout) ?;
659
659
660
660
let ptr = finish_grow ( new_layout, self . current_memory ( elem_layout) , & mut self . alloc ) ?;
661
- // SAFETY: finish_grow would have resulted in a capacity overflow if we tried to allocate more than `isize::MAX` items
661
+ // SAFETY: layout_array would have resulted in a capacity overflow if we tried to allocate more than `isize::MAX` items
662
662
663
663
unsafe { self . set_ptr_and_cap ( ptr, cap) } ;
664
664
Ok ( ( ) )
@@ -680,7 +680,7 @@ impl<A: Allocator> RawVecInner<A> {
680
680
let new_layout = layout_array ( cap, elem_layout) ?;
681
681
682
682
let ptr = finish_grow ( new_layout, self . current_memory ( elem_layout) , & mut self . alloc ) ?;
683
- // SAFETY: finish_grow would have resulted in a capacity overflow if we tried to allocate more than `isize::MAX` items
683
+ // SAFETY: layout_array would have resulted in a capacity overflow if we tried to allocate more than `isize::MAX` items
684
684
unsafe {
685
685
self . set_ptr_and_cap ( ptr, cap) ;
686
686
}
You can’t perform that action at this time.
0 commit comments