@@ -396,7 +396,7 @@ impl Fill for [u8] {
396396/// Implement `Fill` for given type `T`.
397397///
398398/// # Safety
399- /// All representations of `[u8; size_of::<T>()]` are also representations of `T`.
399+ /// All bit patterns of `[u8; size_of::<T>()]` represent values of `T`.
400400macro_rules! unsafe_impl_fill {
401401 ( ) => { } ;
402402 ( $t: ty) => {
@@ -405,7 +405,7 @@ macro_rules! unsafe_impl_fill {
405405 if self . len( ) > 0 {
406406 let size = mem:: size_of_val( self ) ;
407407 rng. fill_bytes(
408- // SAFETY: `self` is not borrowed and all byte sequences are representations of `T`.
408+ // SAFETY: `self` is not borrowed and all byte sequences represent values of `T`.
409409 unsafe {
410410 slice:: from_raw_parts_mut( self . as_mut_ptr( )
411411 as * mut u8 ,
@@ -425,7 +425,7 @@ macro_rules! unsafe_impl_fill {
425425 if self . len( ) > 0 {
426426 let size = self . len( ) * mem:: size_of:: <$t>( ) ;
427427 rng. fill_bytes(
428- // SAFETY: `self` is not borrowed and all byte sequences are representations of `T`.
428+ // SAFETY: `self` is not borrowed and all byte sequences represent values of `T`.
429429 unsafe {
430430 slice:: from_raw_parts_mut( self . as_mut_ptr( )
431431 as * mut u8 ,
@@ -448,9 +448,9 @@ macro_rules! unsafe_impl_fill {
448448 }
449449}
450450
451- // SAFETY: All representations of `[u8; size_of::<u* >()]` are representations of `u*`.
451+ // SAFETY: All bit patterns of `[u8; size_of::<T >()]` represent values of `u*`.
452452unsafe_impl_fill ! ( u16 , u32 , u64 , u128 , ) ;
453- // SAFETY: All representations of `[u8; size_of::<i* >()]` are representations of `i*`.
453+ // SAFETY: All bit patterns of `[u8; size_of::<T >()]` represent values of `i*`.
454454unsafe_impl_fill ! ( i8 , i16 , i32 , i64 , i128 , ) ;
455455
456456impl < T , const N : usize > Fill for [ T ; N ]
0 commit comments