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> {
658658 let new_layout = layout_array ( cap, elem_layout) ?;
659659
660660 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
662662
663663 unsafe { self . set_ptr_and_cap ( ptr, cap) } ;
664664 Ok ( ( ) )
@@ -680,7 +680,7 @@ impl<A: Allocator> RawVecInner<A> {
680680 let new_layout = layout_array ( cap, elem_layout) ?;
681681
682682 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
684684 unsafe {
685685 self . set_ptr_and_cap ( ptr, cap) ;
686686 }
You can’t perform that action at this time.
0 commit comments