Skip to content

Tracking Issue for BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE lint #107457

Closed
@nnethercote

Description

@nnethercote

This is a tracking issue for the BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE lint, which is being added in #104429. The lint detects cases where derive is used with a packed struct that contains a [u8] field.

Example

This lint will trigger for code like this:

#[repr(packed)]
#[derive(Eq, PartialEq)]
pub struct FlexZeroSlice {
    width: u8,
    data: [u8], // triggered
}

At some point in the future this case will be disallowed.

See #104429 for more details, especially the t-lang nomination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-future-incompatibilityCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC

    Type

    No type

    Projects

    Status

    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions