File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2410,8 +2410,8 @@ impl<T> Iterator for IntoIter<T> {
24102410 // same pointer.
24112411 self . ptr = arith_offset ( self . ptr as * const i8 , 1 ) as * mut T ;
24122412
2413- // Read from a properly aligned pointer to make up a value of this ZST.
2414- Some ( ptr :: read ( NonNull :: dangling ( ) . as_ptr ( ) ) )
2413+ // Make up a value of this ZST.
2414+ Some ( mem :: zeroed ( ) )
24152415 } else {
24162416 let old = self . ptr ;
24172417 self . ptr = self . ptr . offset ( 1 ) ;
@@ -2450,8 +2450,8 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
24502450 // See above for why 'ptr.offset' isn't used
24512451 self . end = arith_offset ( self . end as * const i8 , -1 ) as * mut T ;
24522452
2453- // Read from a properly aligned pointer to make up a value of this ZST.
2454- Some ( ptr :: read ( NonNull :: dangling ( ) . as_ptr ( ) ) )
2453+ // Make up a value of this ZST.
2454+ Some ( mem :: zeroed ( ) )
24552455 } else {
24562456 self . end = self . end . offset ( -1 ) ;
24572457
You can’t perform that action at this time.
0 commit comments