Skip to content

New lint: NOP pointer arithmetic #4813

Closed
@CAD97

Description

@CAD97

(I'm not sure if clippy has enough information for this, but it would've caught a big error I just fixed.)

Clippy should lint on the use of <*[const|mut] T>::offset, wrapping_offset, add, wrapping_add, sub, and wrapping_sub where T has size 0. This is a NOP and likely unintended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions