Expand description

The byte_slice_in_packed_struct_with_derive lint detects cases where a byte slice field ([u8]) or string slice field (str) is used in a packed struct that derives one or more built-in traits.


struct FlexZeroSlice {
    width: u8,
    data: [u8],



This was previously accepted but is being phased out, because fields in packed structs are now required to implement Copy for derive to work. Byte slices and string slices are a temporary exception because certain crates depended on them.